[CMake] Linking problem

KSpam keesling_spam at cox.net
Wed Nov 7 11:08:13 EST 2007


It sounds like your static libraries were meant strictly as "convenience" 
libraries (i.e. libraries that are only used internal to the build system to 
make building other libraries easier).  In CMake, it is much easier to not 
use convenience libraries.  Instead, just add all of the sources from the 
static libraries into the appropriate shared library source list.  In other 
words .... skip the middle man.

Static linking is a strange beast.  When you link in a static library, it will 
only resolve symbols that are currently being used.  All other symbols from 
the static library are pruned out.  The nice thing is that this reduces the 
binary object size.  On the other hand, symbols that may be needed further 
down the chain are not resolved, as you have found out.


More information about the CMake mailing list