編譯參數
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錯誤.