I am loading DLL plug-ins at runtime in my GUI application. Once loaded, I then call a method within the plug in called initialize(). In one of my plug-ins, this method makes a call to myMainWindowPtr->addDockWidget(). The myMainWindowPtr is a QMainWindow* that contains the address of the main application window. The problem is that whenever I call a method myMainWindowPtr->... the application crashes immediately.
Please could anyone shed some light as to why calling QMainWindow methods from within the DLL, causes the application to crash?
Edit: Nevermind. The problem was that the DLL was creating its own copy of static members and the value of myMainWindowPtr was never initialized.
Bookmarks