用VS2012 编译 Qt5.0.0 正式版

Qt5.0发布了,我也不知道多了什么东西,官方文档也懒得去看了,用多了自然就知道了,嘿嘿。。

下面来讲解一下用VS2012编译Qt5.0.0正式版的过程:

1. 下载Qt5.0:
http://releases.qt-project.org/qt5/5.0.0/single/qt-everywhere-opensource-src-5.0.0.zip

2. 下载Perl
32位:http://strawberry-perl.googlecode.com/files/strawberry-perl-5.16.2.1-32bit.msi
64位:http://strawberry-perl.googlecode.com/files/strawberry-perl-5.16.2.1-64bit.msi

Python
32位下载地址:http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
64位下载地址:http://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi

3. 在开始菜单的Microsoft Visual Studio 2012中的Visual Studio Tools里面找到VS2012 x86 Native Tools Command Prompt 批处理并以管理员身份运行它.

4. 在上一步打开的批处理中输入(注意把“Qt安装目录”替换成你实际的Qt安装目录,把“Qt所在磁盘盘符”替换为你的Qt安装目录所在磁盘盘符):

cd Qt的configure.bat文件目录
Qt所在磁盘盘符:

比如,我的Qt源码在E:\Soft\Qt\Qt5.0.0\5.0.0\Src\qtbase 我就输入:

cd E:\Soft\Qt\Qt5.0.0\5.0.0\Src\qtbase
E:

5.配置编译选项,输入

configure -opensource -platform win32-msvc2012 -fast -mp -debug-and-release -opengl desktop 

6.开始编译,输入
nmake -i

OK,等待编译完成吧!

标签: none

仅有一条评论

  1. 大喇叭来了啊 :cool: :cool: :cool:

添加新评论