Unsolved g++ static library dependency chain
-
Hi!
Suppose I created a static library
libX.a
, which is in directorysome_path
.Now I want to create another static library
libY.a
at the same directory, and I want to "link"libX.a
intolibY.a
, i.e., all the symbols inlibX.a
to be somehow copied intolibY.a
. This way, when I linklibY.a
to a programZ
, I do not need to linklibX.a
toZ
too.I know I could
ar
every single symbol oflibX.a
intolibY.a
, but I would like to refer tolibX.a
, and not to its symbols directly.Does anyone know how to do it using
g++
?Thanks
-
@canellas Why do you want to do this? In any case you will need to link your application against both static libraries, so what is the advantage of "copying" symbols from one to another?