Relocation error when loading shared object
-
Well that's about it. I get
/home/nye/Programming/C++/qtdaemon/examples/daemon/customcontrol/customcontroller/customcontroller: relocation error symbol _ZTVN8QtDaemon17QDaemonControllerE, version Qt_5 not defined in file libQt5Daemon.so.0 with link time reference
from the loader and I'm at a loss why. The symbol is present in the library mentioned, marked as a weak object for some reason.
nm
output:0000000000018a68 V _ZTVN8QtDaemon17QDaemonControllerE
Any suggestions on reason or solution?
-
Thanks Henry! You're right the
qt_version_tag
symbol is marked as undefined, I wonder why however. I've checked, and all my headers are includingQtCore/qglobal.h
through my own global header (where I define the export/import macros). -
Now I feel really, really stupid!
So the whole problem was that the example application links against my module, but when the loader runs it uses another copy of the library (and old one). The old copy for unfathomable reasons I'd installed to the system location, and because the library is binary compatible it would work ... mostly ... until I started changing the ABI and the example application links against the new and changed binary interface ... thus we arrive here ...