VS2017 编译 QT5.10.1 X64位 静态库 MT


参考文章 https://blog.csdn.net/Devout_programming/article/details/78827112

准备工作
* Supported compiler (Visual Studio 2012 or later, MinGW-builds gcc 4.9 or later)
* Perl version 5.12 or later [http://www.activestate.com/activeperl/]
* Python version 2.7 or later [http://www.activestate.com/activepython/]
* Ruby version 1.9.3 or later [http://rubyinstaller.org/]

1.下载QT5.10.1源码
从这里下载 http://download.qt.io/archive/qt/ 最新版本,现在是 5.10.1 点击进入 Single 目录,下载源代码 qt-everywhere-src-5.10.1.tar.xz

2.下载JOM 并配置到环境变量Path路径
地址:http://download.qt.io/official_releases/jom/jom.zip

3.解压源码到 D:\Library\qt-everywhere-src-5.10.1


4.修改 D:\Library\qt-everywhere-src-5.10.1\qtbase\mkspecs\common\msvc-desktop.conf 文件中 MD修改为MT。
  QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MD
  QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MD
  QMAKE_CFLAGS_DEBUG = -Zi -MDd


5.关掉360等(误杀造成编译失败)


6.启动 "适用于 VS 2017 的 x64 本机工具命令提示"


7.configure -confirm-license -opensource -platform win32-msvc -mp -debug-and-release -static -prefix "D:\Library\qt-5.10.1" -nomake examples -nomake tests


8.jom


9.jom install

 

Visual Studio扩展工具(vsaddin)
http://download.qt.io/development_releases/vsaddin/

Visual Studio官网插件
https://marketplace.visualstudio.com/search?term=qt&target=VS&category=Tools&vsVersion=&subCategory=All&sortBy=Relevance

https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools-19123

 

posted @ 2018-05-10 11:33  XIE晓乐  阅读(746)  评论(0编辑  收藏  举报