
Originally Posted by
wysota
Does your project file state that the compilation is a plugin (I think you need both the "plugin" and "dll" options)?
I will try the Linux switch tonight (I only have access to windows here at work).
As far as windows goes, I had the "plugin" option defined but not "dll" - I added it, did a make clean, qmake, make and the compile error still occurs:
> make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Documents and Settings/pdrummond/Desktop/src/morph/GeMapMSUPlugin'
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\MSUDevicePlugin.o MSUDevicePlugin.cpp
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\MSUDeviceIcon.o MSUDeviceIcon.cpp
C:\Qt\4.1.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"C:/Q
t/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/m
kspecs/win32-g++" -D__GNUC__ -DWIN32 MSUDevicePlugin.h -o release\moc_MSUDevicePlugin.cpp
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\moc_MSUDevicePlugin.o release\moc_MSUDevicePlugin.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -shared -Wl,--out-implib,release\libGeMapMSUPlugin.a -o "release\GeMa
pMSUPlugin.dll" release\MSUDevicePlugin.o release\MSUDeviceIcon.o release\moc_MSUDevicePlugin.o -L"C:\Qt\4.1.0\lib" -lQt3Support4 -lQtGui4 -lQtCore4
Creating library file: release\libGeMapMSUPlugin.a
release\MSUDevicePlugin.o(.text+0x896):MSUDevicePlugin.cpp: undefined reference to `MainWindow::canvas()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\GeMapMSUPlugin.dll] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/pdrummond/Desktop/src/morph/GeMapMSUPlugin'
mingw32-make: *** [release] Error 2
> make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Documents and Settings/pdrummond/Desktop/src/morph/GeMapMSUPlugin'
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\MSUDevicePlugin.o MSUDevicePlugin.cpp
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\MSUDeviceIcon.o MSUDeviceIcon.cpp
C:\Qt\4.1.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"C:/Q
t/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/m
kspecs/win32-g++" -D__GNUC__ -DWIN32 MSUDevicePlugin.h -o release\moc_MSUDevicePlugin.cpp
g++ -c -O2 -O2 -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREA
D_SUPPORT -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"."
-I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\moc_MSUDevicePlugin.o release\moc_MSUDevicePlugin.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -shared -Wl,--out-implib,release\libGeMapMSUPlugin.a -o "release\GeMa
pMSUPlugin.dll" release\MSUDevicePlugin.o release\MSUDeviceIcon.o release\moc_MSUDevicePlugin.o -L"C:\Qt\4.1.0\lib" -lQt3Support4 -lQtGui4 -lQtCore4
Creating library file: release\libGeMapMSUPlugin.a
release\MSUDevicePlugin.o(.text+0x896):MSUDevicePlugin.cpp: undefined reference to `MainWindow::canvas()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\GeMapMSUPlugin.dll] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/pdrummond/Desktop/src/morph/GeMapMSUPlugin'
mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode
Here's my pro file:
TEMPLATE = lib
TARGET +=
DEPENDPATH += .
CONFIG += plugin dll config qt exceptions rtti warn_on release
QT += qt3support
# Input
HEADERS += MSUDevicePlugin.h MSUDeviceIcon.h
SOURCES += MSUDevicePlugin.cpp MSUDeviceIcon.cpp
TEMPLATE = lib
TARGET +=
DEPENDPATH += .
CONFIG += plugin dll config qt exceptions rtti warn_on release
QT += qt3support
# Input
HEADERS += MSUDevicePlugin.h MSUDeviceIcon.h
SOURCES += MSUDevicePlugin.cpp MSUDeviceIcon.cpp
To copy to clipboard, switch view to plain text mode
You say on Linux I need to add "-rdynamic" to the main application - do I need to add anything to the main app for windows?
Bookmarks