Windows,linux下編譯qt源碼(比較簡單)


一、linux下靜態編譯qt源碼

1.取到qt源碼並解壓到文件夾

2.cd到qt目錄下

3.使用configure生成makefile

./configure
–prefix /opt/qtstatic –static –release -nomake examples  --nomake demos
-nomake docs -continue

4.待執行完之后執行make

5.makeinstall

參考:http://www.cnblogs.com/qianyuming/archive/2011/03/09/1978747.html

http://www.cnblogs.com/emouse/archive/2013/01/28/2880142.html

編譯qt程序需要在工程中添加該版本的qt庫,然后到pro工程文件夾中目錄下邊的configure文件修改qt的路徑為新編譯qt版本,之后編譯qt程序。

二、Windows下編譯qt源碼,用vs2010進行的編譯

1.取到qt源碼並解壓到文件夾

2.運行vs2010命令行工具command,cd到qt目錄下

3.執行命令configure -platform win32-msvc2010 -debug-and-release -fast -opensource -developer-build -confirm-license -nomake examples -nomake demos -nomake docs -nomake translations
-no-openssl -webkit -no-qt3support

4.執行nmake

參考:http://hi.baidu.com/dbzhang800/item/44a2a427505e594647996247

同樣編譯qt程序需要更改qt版本,修改路徑即可。

http://www.yaoguangkeji.com/a_G0ymd7a0.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM