Hi Ok, by following the link to the wiki suggested by Michael Loose, I used:
target_link_libraries( myProj -Wl,-whole-archive Kernel -Wl,-no-whole-archive) This has fixed my problem. The executable links and runs correctly. My link command is now: /usr/bin/c++ -O3 -DNDEBUG -Wall -m64 -Wl,--export-dynamic -o myProj -Wl,-whole-archive Kernel/libKernel.a -Wl,-no-whole-archive -ldl -lpython2.4 I don't need portability so I think this is ok. Michael Wild wrote: > The -whole-archive flag is pretty useless with executables > (unless, you plan to use it as a library too, but that is > outlandish). --export-dynamic may be also necessary, if > your dlopen'ed libraries use symbols in your executable. So my concern is now: am I being 'outlandish' ? The dlopen'ed libraries do use functions in libKernel.a that is linked to the executable. Is this outlandish? Is there a better way? Thanks for your help so far. Best regards David _______________________________________________ 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