Hi.

I'm working on a project basically compound of :

 - a core library that can be static or dynamic

 add_library(Foo-lib ${FOO_LIB_SOURCES})

 - an executable that rely on the main library :

 add_executable(Foo-bin ${FOO_BIN_SOURCES})
 target_link_libraries(Foo-bin Foo-lib)

 - a "dlopen"able plugin that need some functions of the Foo library :

 add_library(Foo-plugin MODULE ${FOO_PLUGIN_SOURCES})
 target_link_libraries(Foo-plugin Foo-lib)

I don't need the last line under linux : i usually don't link Foo-plugin 
against Foo-lib.
And that's good because if i choose to build a static Foo-lib, i don't want in 
Foo-plugin all symbols that will be already present in Foo-bin.

Under Windows (MinGW) or MacOSX, without this last line i have unresolved 
symbols when i compile Foo-plugin. So i let it be.
The problem comes when i try to compile static Foo-lib. I have segfault at the 
Foo-plugin load time, probably because of some static class/variables 
initializations.


What is the good practice please ? Isn't there any option to tell to ignore 
unresolved symbols for MODULE ? They will be resolved at load time !

Regards.

Paul.

P.S i use a 2.8.10 version of cmake.



--

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