From: Bogdan M. <dag...@gm...> - 2010-03-24 23:09:08
|
On Wed, Mar 17, 2010 at 1:44 PM, Bogdan Marinov <dag...@gm...> wrote: > Hello. > > As reported by Barry Gerdes, there's a problem with the dynamic > plug-ins on Windows. If the plug-in contains some references to > Stellarium's GUI, a linker error is thrown: > > D:\Qt\2010.02.1\mingw\bin\g++.exe -enable-runtime-pseudo-reloc > -Wl,--allow-multiple-definition -shared -o libExampleDialog.dll > -Wl,--major-image-version,0,--minor-image-version,0 > CMakeFiles\ExampleDialog.dir\ExampleDialog.cpp.obj > CMakeFiles\ExampleDialog.dir\gui\ExampleDialogWindow.cpp.obj > CMakeFiles\ExampleDialog.dir\gui\StelDialogExampleDialog.cpp.obj > CMakeFiles\ExampleDialog.dir\gui\moc_StelDialogExampleDialog.cxx.obj > CMakeFiles\ExampleDialog.dir\gui\moc_ExampleDialogWindow.cxx.obj > CMakeFiles\ExampleDialog.dir\moc_ExampleDialog.cxx.obj > CMakeFiles\ExampleDialog.dir\qrc_exampleDialog.cxx.obj > -LD:\stellarium\stellarium\builds\msys\src -lstelMain > D:\Qt\2010.02.1\qt\lib\libQtOpenGLd4.a -lopengl32 -lglu32 -lgdi32 > -luser32 D:\Qt\2010.02.1\qt\lib\libQtGuid4.a -limm32 -lwinmm > D:\Qt\2010.02.1\qt\lib\libQtNetworkd4.a > D:\Qt\2010.02.1\qt\lib\libQtCored4.a -lws2_32 -lglu32 -lopengl32 > -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 > -luuid -lcomdlg32 -ladvapi32 > Info: resolving vtable for StelModule by linking to > __imp___ZTV10StelModule (auto-import) > Info: resolving StelApp::singleton by linking to > __imp___ZN7StelApp9singletonE (auto-import) > Info: resolving StelMainGraphicsView::singleton by linking to > __imp___ZN20StelMainGraphicsView9singletonE (auto-import) > mingw32-make[2]: Leaving directory > `D:/stellarium/extmodules/ExampleDialog/builds/msys' > mingw32-make[1]: Leaving directory > `D:/stellarium/extmodules/ExampleDialog/builds/msys' > d:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: > warning: auto-importing has been activated without > --enable-auto-import specified on the command line. > This should work unless it involves constant data structures > referencing symbols from auto-imported DLLs. > CMakeFiles\ExampleDialog.dir\ExampleDialog.cpp.obj:D:/stellarium/extmodules/ExampleDialog/src/ExampleDialog.cpp:98: > undefined reference to `StelButton::StelButton(QGraphicsItem*, QPixmap > const&, QPixmap const&, QPixmap const&, QAction*, bool)' > CMakeFiles\ExampleDialog.dir\ExampleDialog.cpp.obj:D:/stellarium/extmodules/ExampleDialog/src/ExampleDialog.cpp:99: > undefined reference to `StelGui::getButtonBar()' > CMakeFiles\ExampleDialog.dir\ExampleDialog.cpp.obj:D:/stellarium/extmodules/ExampleDialog/src/ExampleDialog.cpp:99: > undefined reference to `BottomStelBar::addButton(StelButton*, QString > const&, QString const&)' > CMakeFiles\ExampleDialog.dir\gui\ExampleDialogWindow.cpp.obj:ExampleDialogWindow.cpp:(.text$_ZN8BarFrameC1EP7QWidget[BarFrame::BarFrame(QWidget*)]+0x39): > undefined reference to `vtable for BarFrame' > CMakeFiles\ExampleDialog.dir\gui\ExampleDialogWindow.cpp.obj:ExampleDialogWindow.cpp:(.text$_ZN8BarFrameC1EP7QWidget[BarFrame::BarFrame(QWidget*)]+0x43): > undefined reference to `vtable for BarFrame' > collect2: ld returned 1 exit status > mingw32-make[2]: *** [src/libExampleDialog.dll] Error 1 > mingw32-make[1]: *** [src/CMakeFiles/ExampleDialog.dir/all] Error 2 > mingw32-make: *** [all] Error 2 > Exited with code 2. > Error while building project ExampleDialog > When executing build step 'Make' > > Both KeyBundings and ExampleDialog are affected, which is normal, as > the former is based on the latter. > > Could someone help me with this, please? This effectively limits > plug-in development on Windows. I've made a few futile attempts at solving this today. It seems that it is impossible to link to any classes in the GUI (e.g. StelButton, BarFrame, StelDialog). Am I missing something obvious? Bogdan |