VS2017 編譯 QT5.10.1 X64位 靜態庫 MT


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

準備工做
* 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/]ruby

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.zipui

3.解壓源碼到 D:\Library\qt-everywhere-src-5.10.1.net


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等(誤殺形成編譯失敗)debug


6.啓動 "適用於 VS 2017 的 x64 本機工具命令提示"orm


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


8.jomip


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

相關文章
相關標籤/搜索