首页 > 代码库 > Qt 静态编译的问题.
Qt 静态编译的问题.
编译参数
configure -confirm-license -opensource -developer-build -static -prefix D:\libraries\Qt5.3.1s -mp -platform win32-msvc2013 -opengl desktop -no-angle -nomake examples -nomake tests -no-icu -no-openssl -qt-libjpeg -qt-libpng -no-plugin-manifests -skip qtwebkit -skip qtdeclarative
静态编译出来的Qt, 链接库需要很多:
Debug:
qtmaind.lib
Qt5Cored.lib
Qt5Guid.lib
Qt5Widgetsd.lib
WS2_32.LIB
imm32.lib
winmm.lib
opengl32.lib
qwindowsd.lib
Qt5PlatformSupportd.lib
Release:
qtmain.lib
Qt5Core.lib
Qt5Gui.lib
Qt5Widgets.lib
WS2_32.LIB
imm32.lib
qwindows.lib
winmm.lib
opengl32.lib
Qt5PlatformSupport.lib
而且需要在代码中添加如下代码, 来链接qwindows.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
否则会出现.
Can’t load plugin qwindows 运行时错误.
_wsaayncselect link错误.
Qfontbase link错误.
Qt 静态编译的问题.