阅读 82

Build Qt5 Source 配置Qt5

Building

下载源代码: opensource: zip

配置步骤:

>先安装需要的各种软件, 有的需要手动build一下source, 按照ReadMe做就行;

>最坑爹的是Python, 需要安装老版本, 5.0.2完全Build一次要N个小时, 整个11G, 中间就这么error了, nnd;

1) ActivePerl & Ruby & Python (注意 use 2.7 instead of 3.3; Qt_Build_Bug
2) Microsoft Platform SDK (Issue: Cannot_Install_Windows_SDK) (Change_SDK_version) 
3) 
KB2485545 or Service Pack 1 
4) OpenSSL - The Netwide Assembler 
5) Microsoft DirectX SDK
6) ICU (for Webkit) 
7) optional: jom (for multi-core CPU to speed up), ANGLE (removing the need to install graphics drivers on the target machines)

>环境变量: ...\bin; 加到 %PATH%; ...\include; 加到 %INCLUDE%; ...\lib; 加到 %LIB%; 如果有环境变量没有设置好, configure完了会有warnning;

>config & nmake: 
1) open VS2010 command prompt; 2) configure -platform win32-msvc2010(or linux-g++-64); 3) nmake; (如果configure错了需要 nmake confclean; nmake distclean; 清理旧的配置和中间文件)

Note 1)make sure all the version is at same page; 2) 如果想有选择的build, 需要查询帮助, 在configure的时候加入参数, e.g. to support SQLite[-qt-sql-sqlite]

Build issue

>nmake error- http://qt-project.org/forums/viewthread/5362

>windows SDK version- http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/ebc8914f-d4b5-44e7-8c76-10332d155812/ 

>chinese system http://blogs.msdn.com/b/windowssdk/archive/2009/08/21/windows-sdk-configuration-tool-may-report-an-error-when-os-display-format-is-not-english.aspx

Tips

>如果你使用VS2010来编译, 保证所有的库都是统一用VS2010. Build in VS2010 command prompt; if we use VS2008 it might cause some problems when we link to the Qt libraries because the compatibility issue. 

>x64 binary building: still use win32-msvc(spec)

 

帮助信息

>Building Qt Desktop for Windows with MSVChttp://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC

>QT5 building dochttp://qt-project.org/wiki/Building_Qt_5_Documentation

>requriements: http://qt-project.org/doc/qt-5.0/qtdoc/requirements.html

>Windows http://qt-project.org/doc/qt-5.0/qtdoc/install-win.html

---Building End---


QtCreator

 

调试

>MSVC 安装SDK, Debugging Tools. QtCreator中找到调试器手动添加Debugging Tools的路径, 记得重启QtCreator.
http://msdn.microsoft.com/en-us/windows/hardware/hh852360

>MinGW 到工程设置添加编译器(找到Qt的MinGW), 调试器自动检测就可以选中;

>查看调试器: 工具->选项->构建和运行->Kit    

---QtCreator End---


文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐