Am Montag, 23. Mai 2011, 01:36:14 schrieb Sanatan Rai:
> After cmake, and make all, the libraries build as static archives, ie I get
> liblib1.a, liblib2.a, libhelper1.a, libhelper2.a and executable myProj in
> the appropriate locations. However, the executable myProj does not appear
> to have linked statically to libhelper1.a and libhelper2.a. These
> libraries contain global initialisers for certain objects: which doesn't
> happen when I run the executable.

Most likely, the linker just drops those "global initialisers" when linking 
statically.  See the linker options in "man ld" to prevent that or give the 
library an initialisation method.

HS
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to