I have built a static version of Qt 5.1 for Windows using mingw-builds. I use the following when linking to my application:
-lQt5Core
-lQt5Gui
-lQt5Widgets
-lQt5PrintSupport
-lQt5PlatformSupport
-lqtmain
-lqwindows
-lwindowsprintersupport
-lz
-lole32
-lws2_32
-luuid
On my main file, I have this:
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)
But when I build the application, I get the following errors:
Qt/lib/win32/libQt5Gui.a(qtextdocument.o):qtextdocument.cpp:(.text+0xa3b2): undefined reference to `qDecodeDataUrl(QUrl const&, QString&, QByteArray&)’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×17a4): undefined reference to `qt_cpu_features’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×181b): undefined reference to `qDetectCpuFeatures()’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×1820): undefined reference to `qt_cpu_features’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×1827): undefined reference to `qDetectCpuFeatures()’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×182c): undefined reference to `qt_cpu_features’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×1833): undefined reference to `qDetectCpuFeatures()’
Qt/lib/win32/libQt5Gui.a(qimage.o):qimage.cpp:(.text+0×1838): undefined reference to `qt_cpu_features’
c:/program files/mingw-builds/x32-4.8.1-posix-dwarf-rev2/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../../i686-w64-mingw32/bin/ld.exe: Qt/lib/win32/lib
Qt5Gui.a(qimage.o): bad reloc address 0xd4 in section `.data’
Which additional libraries do I need to link to in order to resolve this?
↧