P
Peetah_junkmail
Hi,
I'm not sure this is completely a C related question since it's more about
linking problems, so don't hesitate to redirect me to a more appropriate
NG.
I have a set of useful functions (let's call this SUF) that facilitates my
life when coding, such as memory allocation wrappers or generic string
functions. I have a project composed of a shared library (SL) and a main
program (MP) using SL. For some reasons, I don't want to make a shared
library from SUF. The problem is that both MP and SL are using functions
from SUF. Hence, there are some conflicts, since MP and SL include each
the same symbols linked from SUF.
To summarize:
code for SUF is build as a convenience static library
code for SL is linked to the SUF convenience static library, linked as a
shared library and installed on the target system
code for MP is linked to the SUF convenience static library, linked to SL
and installed on the target system
Therefore, the SUF code is defined twice, once by SL and once by MP.
Would you have a solution for this ?
thanks
I'm not sure this is completely a C related question since it's more about
linking problems, so don't hesitate to redirect me to a more appropriate
NG.
I have a set of useful functions (let's call this SUF) that facilitates my
life when coding, such as memory allocation wrappers or generic string
functions. I have a project composed of a shared library (SL) and a main
program (MP) using SL. For some reasons, I don't want to make a shared
library from SUF. The problem is that both MP and SL are using functions
from SUF. Hence, there are some conflicts, since MP and SL include each
the same symbols linked from SUF.
To summarize:
code for SUF is build as a convenience static library
code for SL is linked to the SUF convenience static library, linked as a
shared library and installed on the target system
code for MP is linked to the SUF convenience static library, linked to SL
and installed on the target system
Therefore, the SUF code is defined twice, once by SL and once by MP.
Would you have a solution for this ?
thanks