[Kde-pim] Need help with the undefined reference hack

Christian Mollekopf chrigi_1 at fastmail.fm
Tue Oct 18 13:39:19 BST 2011


Hi,

With the refactoring of the nepomukfeeder to a plugin based architecture
we 
ran into the problem that the nepomuk_email_feeder in kdepim has to
depend on 
code in kdepim-runtime (because we can't push the code into kdepimlibs
yet).
We decided to go for a workaround until we can push the necessary libs
into 
kdepimlibs.

The idea is to create a runtime dependency on the necessary lib in
kdepim-
runtime, but I failed so far to create something which actually works.
To ignore the unresolved symbols (which are supposed to be resolved
during 
runtime) these options were added:
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS 
"${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}
-Wl,--allow-shlib-undefined,--warn-
unresolved-symbols,--no-fatal-warnings")

Now I need to tell the linker that the library with the name 
nepomukfeederpluginlib will resolve the symbols on runtime, but in a way
that 
it is not needed to compile the code.
Currently the nepomukfeederpluginlib is not linked to the
nepomuk_email_feeder 
at all, but that leads to unresolved symbols during runtime.

I suppose it should be possible somehow tell the nepomuk_email_feeder
that the 
nepomukfeederpluginlib will resolve the unknown symbols but couldn't
figure out 
how so far. Is there maybe some linker option?
target_link_libraries is not an option because it creates a compiletime 
dependency.

Any ideas?

Cheers,
Christian
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list