So I have, say, libA.a libB.a libC.a libD.so
and some code that is linked into libPack.a
. Later on, I'll create libFinal.so
that will link to libPack.a and the libFinal.so is finally used on a executable.
When the linker creates the static library, I believe every dynamic library is resolved and included at compile time within the static library. Does it do that as well for (-fPIC
) third party static libraries?
How can I combine a bunch of static libraries and shared libraries into one huge stand-alone libFinal.so
library using CMake? If that's not possible, does it mean I have to provide all the lib dependences to the client?
I've managed to get the executable working with a dummy library without dependencies (without libA...D
), but I get undefined symbols for third-party libraries when I use a libPack.a linked to libA..D
. My guess is that static libraries are not shipped within libPack.a
, but I'm not sure what's going on.