Wednesday, April 23, 2014

Error: Loading plugin error: Cannot load library /usr/local/SomeLib/libSomeLib.so.1.0.0: (/usr/local/SomeLib/libSomeLib.so.1.0.0: undefined symbol: _ZN18SomePluginModuleD1Ev)

Got this annoying error in QPluginLoader when I deployed and tried to run the application. It took a while before i realized what my mistake was.

I accidentally missed to add a implementation for the destructor and that caused the error message, found this forum post that got me in the right direction:
http://www.qtcentre.org/threads/17253-QPluginLoader-doesn-t-load-plugin

.h with destructor:
~SomePluginModule();

.cpp did not have:
SomePluginModule::~SomePluginModule()
{
   //clean up...
}

No comments: