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
-
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