下载http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-windows-opensource-5.1.1-mingw48_opengl-x86-offline.exe
执行configure.exe -static -release
提示WARNING: Using OpenGL ES 2.0 without ANGLE.
Specify -opengl desktop to use Open GL.
The build will most likely fail.
(Press any key to continue...)
执行configure.exe -static -release -opengl desktop
通过了。
再执行mingw32-make
等了2个小时。。
QMAKE_LFLAGS=-static -static-libgcc -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
configure -confirm-license -opensource -prefix "E:Qtqt5.3.1_static_build" -debug-and-release -static -platform win32-g++ -opengl desktop -no-angle -nomake examples -nomake tests -skip qtwebkit -no-qml-debug
解释一下上面的命令:
-opensource 编译和链接开源版的Qt.
-prefix "G:QtQt5.3.1" 最后装到目录G:QtQt5.3.1
-debug-and-release 编译debug版本和release版本
-static 静态编译
-platform win32-g++ 目标平台,win32
-opengl desktop 选择desktop的opengl
-no-angle
-nomake examples 不编译examples
-nomake tests 不编译tests
-skip qtwebkit 不编译qtwebkit