msvc14.1(vs2017)编译x64的qt5.9.1

vs2017安装在"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"。

qt源码在"F:\qt-everywhere-opensource-src-5.9.1"

1. 打开cmd,执行vs编译工具链的环境设置

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
2. 执行qt的configure配置。这里,不要编译qtwebengine,因为qtwebengine的代码有问题,会编译错误
cd F:\qt-everywhere-opensource-src-5.9.1
mkdir qt-build && cd qt-build
..\configure.bat -skip qtwebengine -confirm-license -opensource -debug-and-release -nomake tests -nomake examples -prefix F:\Qt\5.9.1_x64
3. 执行make。建议将make的输出重定向,因为cmd窗口保留的记录太短了

nmake > nmake.out.txt 2>&1
4.

nmake install

5. 另外还可以安装qt文档

nmake docs
nmake install_docs


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章