不多說。
編譯配置參數如下
configure.bat -static -no-openssl -release
不支持OpenSSL
,也沒有安裝各個數據庫的Driver
,所以數據庫方面也只支持了SQLite
。
下載地址如下
全部文件下載 鏈接: http://pan.baidu.com/s/1bp1rdCF 密碼: dsve
頭文件和庫文件下載 鏈接: http://pan.baidu.com/s/1c2ep95m
------------------2017年9月5日23:55:51 補充----------------------
感謝 @藍天白雲-QT 提出的疑惑,這里簡單的說一下。
在編譯的靜態庫使用的是/MD
鏈接,所以/MT
參數的不能編過。
鏈接的時候可能會提示很多符號找不到,這個原因是靜態庫很多符號都是依賴於外部,具體可看各個lib
文件同名的pri
文件,將相應的庫添加到工程中即可。
這里以一個Qt自帶的計算器示例代碼做了個簡單的VS工程,測試可用。
https://files.cnblogs.com/files/oloroso/calculator.7z
然后還有就是編譯出的結果運行的時候可能會出現
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".
Reinstalling the application may fix this problem.
的問題,這個是因為找不到插件目錄的原因,這個問題解決也很簡單,將plugins/platforms
目錄整個拷貝到生成的exe文件目錄。
同時在main
函數中添加QCoreApplication::addLibraryPath("./");
語句。
具體的可以看 https://stackoverflow.com/questions/21268558/application-failed-to-start-because-it-could-not-find-or-load-the-qt-platform-pl