stevey
2nd November 2009, 03:07
Hi,
I'm trying to create a custom plugin using the QtPlugin framework.
I have 3 projects, a main Ui app, a "core" dll containing my plugin interface and an implementation of the plugin in another dll.
I'm getting the following compile errors in Qt Creator:
Starting: C:/Qt/2009.03/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `D:/Development/QtTests/TestPlugin1'
C:/Qt/2009.03/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/Development/QtTests/TestPlugin1'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,debug\libTestPlugin1.a -o debug\TestPlugin1.dll debug/TestPlugin1.o debug/moc_TestPlugin1.o -L"c:\Qt\2009.03\qt\lib" -L../TestAppCore/debug -lTestAppCore -lQtXmld4 -lQtCored4
mingw32-make[1]: Leaving directory `D:/Development/QtTests/TestPlugin1'
mingw32-make: Leaving directory `D:/Development/QtTests/TestPlugin1'
Creating library file: debug\libTestPlugin1.a
debug/TestPlugin1.o: In function `ZN8QPointerI7QObjectEaSEPS0_':
c:/Qt/2009.03/qt/include/QtCore/../../src/corelib/kernel/qpointer.h:(.text$_ZN12CustomPluginC2Ev[CustomPlugin::CustomPlugin()]+0x7): undefined reference to `_imp___ZTV12CustomPlugin'
debug/moc_TestPlugin1.o: In function `ZThn8_N11TestPlugin1D1Ev':
D:/Development/QtTests/TestPlugin1/debug/moc_TestPlugin1.cpp:(.text$_ZN11TestPlugin1D1Ev[TestPlugin1::~TestPlugin1()]+0x54): undefined reference to `_imp___ZN12CustomPluginD2Ev'
D:/Development/QtTests/TestPlugin1/debug/moc_TestPlugin1.cpp:(.text$_ZN11TestPlugin1D0Ev[TestPlugin1::~TestPlugin1()]+0x54): undefined reference to `_imp___ZN12CustomPluginD2Ev'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\TestPlugin1.dll] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project TestPlugin1
When executing build step 'Make'
I think it's to do with vtables and such, but I'm not sure how to fix the problem.
I've set the following varialbes in TestPlugin1.pro:
INCLUDEPATH += ../TestAppCore
LIBS += -L../TestAppCore/debug -lTestAppCore
Can someone please point out what's probably completely obvious? ;)
I've attached the 3 projects to this thread.
Thanks,
Stephen York
I'm trying to create a custom plugin using the QtPlugin framework.
I have 3 projects, a main Ui app, a "core" dll containing my plugin interface and an implementation of the plugin in another dll.
I'm getting the following compile errors in Qt Creator:
Starting: C:/Qt/2009.03/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `D:/Development/QtTests/TestPlugin1'
C:/Qt/2009.03/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/Development/QtTests/TestPlugin1'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,debug\libTestPlugin1.a -o debug\TestPlugin1.dll debug/TestPlugin1.o debug/moc_TestPlugin1.o -L"c:\Qt\2009.03\qt\lib" -L../TestAppCore/debug -lTestAppCore -lQtXmld4 -lQtCored4
mingw32-make[1]: Leaving directory `D:/Development/QtTests/TestPlugin1'
mingw32-make: Leaving directory `D:/Development/QtTests/TestPlugin1'
Creating library file: debug\libTestPlugin1.a
debug/TestPlugin1.o: In function `ZN8QPointerI7QObjectEaSEPS0_':
c:/Qt/2009.03/qt/include/QtCore/../../src/corelib/kernel/qpointer.h:(.text$_ZN12CustomPluginC2Ev[CustomPlugin::CustomPlugin()]+0x7): undefined reference to `_imp___ZTV12CustomPlugin'
debug/moc_TestPlugin1.o: In function `ZThn8_N11TestPlugin1D1Ev':
D:/Development/QtTests/TestPlugin1/debug/moc_TestPlugin1.cpp:(.text$_ZN11TestPlugin1D1Ev[TestPlugin1::~TestPlugin1()]+0x54): undefined reference to `_imp___ZN12CustomPluginD2Ev'
D:/Development/QtTests/TestPlugin1/debug/moc_TestPlugin1.cpp:(.text$_ZN11TestPlugin1D0Ev[TestPlugin1::~TestPlugin1()]+0x54): undefined reference to `_imp___ZN12CustomPluginD2Ev'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\TestPlugin1.dll] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project TestPlugin1
When executing build step 'Make'
I think it's to do with vtables and such, but I'm not sure how to fix the problem.
I've set the following varialbes in TestPlugin1.pro:
INCLUDEPATH += ../TestAppCore
LIBS += -L../TestAppCore/debug -lTestAppCore
Can someone please point out what's probably completely obvious? ;)
I've attached the 3 projects to this thread.
Thanks,
Stephen York