I am using QLibrary to load some classes from shared libraries, used as plugins in my application. The idea is to have a certain dir filled with plugins which are loaded during aplication startup. Class information is loaded from these plugins and for each class, an instance is created and added to a list.
The plugins are classes which extend an interface class, which is statically linked against the application. The method used herefor is described in http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/C++-dlopen-mini-HOWTO.ht...
The whole situation and code is described at http://tinus.ath.cx/dlopen.html
Now, as you can see, I've set the QLibrary object to not unload the library. However, in the vdowall::addItem() method, the Abstract::clone() call makes the application segfault (found using a gdb backtrace). My idea is that the QLibrary data is unloaded from memory, although I don't know how to check that.
Note that whenever I statically link the plugins to the application, it works just fine. Anyone has an idea or suggestions?
Thanks in advance! Kind regards,