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

posted @ 2017-09-08 20:08  findumars  Views(7373)  Comments(0Edit  收藏  举报