[CMake] Linking problem

Brandon Van Every bvanevery at gmail.com
Wed Nov 7 11:55:57 EST 2007


On Nov 7, 2007 11:08 AM, KSpam <keesling_spam at cox.net> wrote:
>
> 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.

I don't see why people think this is "strange."  Granted, the word
"static" is overloaded in C parlance, but generally it means the scope
of the data is hidden.  If you put static stuff into a dynamic
library, the only intent is to make all the dynamic functions work and
export properly.  It's not to reveal all your underlying static gunk +
the dynamic functions.


Cheers,
Brandon Van Every


More information about the CMake mailing list