Relocation error when loading shared object

  • Qt Champions 2017

    Well that's about it. I get

    relocation error
    symbol _ZTVN8QtDaemon17QDaemonControllerE, version Qt_5 not defined in file 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?

  • Hi I've seen this when one .cpp includes qglobal.h and another one does not. It's the new qversiontagging.h file that defines a qt_version_tag symbol, like your Qt_5 above...

  • Qt Champions 2017

    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 including QtCore/qglobal.h through my own global header (where I define the export/import macros).

  • Qt Champions 2017

    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 ...

  • Ha I know the feeling, like me before, thinking ".. that stupid Qt, why doesn't this work, why are they so dumb..." oooh, it helps to run qmake again :-)