vs2010编译64位qt5.5
2016年06月03日 10:16:31 xiao503 阅读数 5682
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.youkuaiyun.com/xiao503/article/details/51576425
下载qt5.5源代码 [http://download.qt.io/archive/qt/5.5/5.5.0/single/]
编译环境:
1、64位win7操作系统
2、安装vs2010
3、下载并安装 Perl Python Ruby
* 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/]
4、下载安装 DirectX SDK [https://www.microsoft.com/en-us/download/details.aspx?id=6812]
编译:
1、打开vs64位命令提示工具:开始菜单->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio x64 win64 命令提示(2010)
2、cd到qt源代码目录:cd <path>\qt-everywhere-opensource-src-<version>
3、配置编译选项:configure -prefix e:/qt5.5/msvc2010_x64_static -opensource -confirm-license -nomake tests -nomake examples -debug-and-release -static -qt-zlib -qt-libpng -qt-libjpeg
-prefix [dir] 编译后的安装路径
-opensource 使用LGPL协议
-confirm-license 自动确确定LGPL2.1许可。
-nomake tests 用生成测试,加快编译
-nomake examples 禁用生成例子,加快编译
-debug-and-release 编译Debug和Release版本
-static 编译静态库
-qt-zlib 使用QT自带的zlib库
-qt-libpng 使用QT自带的libpng库
-qt-libjpeg 使用QT自带的libjpeg库
4、编译: nmake
5、安装: nmake install
6、编译文档: nmake docs
7、安装文档: nmake install_docs
8、清理中间文件: nmake clean
配置vs2010
1、下载并安装Qt5 Visual Studio Add-in [http://www.qt.io/download-open-source/#section-2]
2、打开VS2010 -> Qt5 -> Qt Options,在Qt Versions选项卡中添加上述编译的版本
3、新建一个Qt工程,Qt5 -> Qt Project Settings,在Version中,指定上述编译的版本
4、vs选择x64,编译,生成64位的程序