首先要准备一些依赖:

下载Qt 5.2.0 rc版的源码 qt-everywhere-opensource-src-5.2.0-rc1.7z 并解压出来, 我的路径为D:\qt5\qt-src-5.2.0-rc1, (我把qt-everywhere-opensource-src-5.2.0-rc1重命名为qt-src-5.2.0-rc1, 名字太长了 --!)

python: 2.6.x以上

ruby: 1.9.3以上 (ruby1.9.3-windows-installer)

perl: 5.14以上 (http://www.activestate.com/activeperl/downloads)

openssl: 需要编译用vs2010编译openssl, 编译步骤可以参考这篇: http://www.cnblogs.com/shootingstars/archive/2006/02/17/332276.html . 我使用的版本为openssl-1.0.1e

icu: Qt提供的开发包下载地址. http://download.qt-project.org/development_releases/prebuilt/icu/prebuilt/msvc2010/icu_51_1_msvc_2010_32_devel.7z

directx : angle库(用于映射gles2.0API到dx9)依赖它, 我安装的directx sdk june 2010版本, 详细解释参考这篇http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL

开始编译:

1. 打开Visual Studio 2010 Command Prompt

  先配置path路径, 最好是干净的path, 否则可能会遇到莫名其妙的变异错误(例如: path中包含git的话, 可能会优先使用git下的perl.exe)

  所以这样, 执行echo %path% , 然后把与vs2010相关的路径和system32路径复制出来, 然后在手动加上perl, python等依赖的路径, 我的设置如下

set path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Deploy;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;D:\libraries\Ruby193\bin;D:\libraries\Perl\bin;C:\Windows\system32;D:\libraries\Python26;D:\qt5\qt-src-5.2.-rc1\gnuwin32\bin;%CD%\qtbase\bin;D:\libraries\icu\icu51-\lib;

其中

D:\libraries\Ruby193\bin;D:\libraries\Perl\bin;D:\libraries\Python26;D:\qt5\qt-src-5.2.-rc1\gnuwin32\bin;%CD%\qtbase\bin;D:\libraries\icu\icu51-\lib;
gnuwin32\bin; 包含一些gnu工具, 而webkit的编译依赖bison, flex, gperf. 
icu\icu51-1\lib; Qt编译出来的uic.exe doc.exe等依赖icu*.dll
%CD%\qtbase\bin; qmake.exe, uic.exe等

2. Configure

d:
cd D:\qt5\qt-src-5.2.-rc1
configure -opensource -developer-build -mp -platform win32-msvc2010 -nomake examples -nomake tests -icu -I D:\libraries\icu\icu51-\include -L D:\libraries\icu\icu51-\lib -openssl -I D:\libraries\openssl-1.0.1e\inc32 -L D:\libraries\openssl-1.0.1e\out32dll

在configure时, -openssl -icu启用openssl和icu支持, 并设置其头文件路径和库文件路径

关于configure的具体参数(例如编译静态库什么的), 可以执行configure -help 查看

.................

OpenSSL support.............yes

................
Third Party Libraries:
ZLIB support............qt
GIF support.............plugin
JPEG support............plugin
PNG support.............yes
FreeType support........yes
HarfBuzz-NG support.....no
PCRE support............qt
ICU support.............yes
ANGLE...................yes ..............

configure的部分结果

3. nmake

如果没有问题的, 应该一路编译过去了

如果编译完成后缺少*webkit*.dll的话, 可以再执行nmake module-qtwebkit

PS: Qt的编译太麻烦了. 配置麻烦而且时间又长. 艹啊, 我从中午编译到晚上.

vs2010 编译Qt5.2 rc1的更多相关文章

  1. VS2010编译Qt5.4.0静态库

    http://www.kavenblog.com/?p=375 1.Qt的跨平台十分优秀,但是在Windows上是还是会有许多问题,其中之一就是动态链接库的问题,Qt程序的发布必须带一个体积不小的DL ...

  2. 【Qt】VS2010编译Qt5.3.2 64bit

    1. 为什么要这么做 在Windows下,Qt官网默认提供的二进制版本大多是32位,目前(2015.01.24)只对VS2013提供了64位版本,如下图所示: 为了适应我目前安装的VS2010 IDE ...

  3. VS2015编译Qt5.7.0生成支持XP的静态库(很不错)

    一.编译工具 1.VS2015 编译Qt5.7.0的所需VS版本:Visual Studio 2013 (Update1)或Visual Studio 2015 (Update2).因为Update补 ...

  4. VS2010编译Boost 1.57 静态链接库

    http://www.cnblogs.com/cuish/p/4175491.html 0.前提 Boost库版本 1.57.0 下载地址 http://www.boost.org/users/his ...

  5. msvc2013编译qt5.6源码

    1.回顾 说起到qt的编译,真是领人痛心啊,不仅编译选项繁多,而且编译时间比较久,总是能使想编译qt源码的人望而却步,呵呵...我就是其中一个,不知道从什么时候开始就想着把qt的源码编译一下,也尝试过 ...

  6. linux下编译qt5.6.0静态库——configure配置

    linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项 Configure选项 第三方库: 附加选项: QNX/Blackberr ...

  7. VS2010 win7 QT4.8.0,实现VS2010编译调试Qt程序,QtCreator静态发布程序

    下载源代码,注意一定是源码压缩包如qt-everywhere-opensource-src-4.8.0.zip, 不是Qt发布的已编译的不同版本的标准库如qt-win-opensource-4.8.0 ...

  8. Win10 + VS2015 下编译 Qt5.6.0

    近期由于另外一个项目需要用 vs2015 ,于是把 Qt 也升级到了 5.6.0 .由于项目需要兼容 Windows xp ,所以需要自己编译 Qt .这里大致整理一下编译的过程. 安装 Active ...

  9. 使用vs2010编译 Python \ SIP \ PyQt4

    (1)先使用vs2010编译 Python http://www.cnblogs.com/fortwo/archive/2013/04/16/3023871.html 注意,若编译的为debug版的P ...

随机推荐

  1. Unity中Instantiate一个prefab时需要注意的问题

    在调用Instantiate()方法使用prefab创建对象时,接收Instantiate()方法返回值的变量类型必须和声明prefab变量的类型一致,否则接收变量的值会为null.   比如说,我在 ...

  2. 优雅地对泛型List 进行深拷贝

    public class People { public string Name; public int Age; public People(string name, int age) { this ...

  3. 分布式应用框架Akka快速入门

    转自:http://blog.csdn.net/jmppok/article/details/17264495 本文结合网上一些资料,对他们进行整理,摘选和翻译而成,对Akka进行简要的说明.引用资料 ...

  4. j2ee指导型框架或示例

    springside appfuse springfuse

  5. MYSQL event_scheduler

    一.概述  事件调度器是在 MySQL 5.1 中新增的另一个特色功能,可以作为定时任务调度器,取代部分原先只能用操作系统任务调度器才能完成的定时功>能.例如,Linux 中的 crontabe ...

  6. c# socket编程简单例子

    服务器端代码 using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Thr ...

  7. Java IO (2) - OutputStream

    Java IO (2) - OutputStream 前言 JavaIO一共包括两种,一种是stream,一种是reader/writer,每种又包括in/out,所以一共是四种包.Java 流在处理 ...

  8. java 指导 (Java Tutorial)

    case1: site:docs.oracle.com -xmx -xms case2: site:docs.oracle.com thread case3: site:docs.oracle.com ...

  9. Netty笔记

    1 基本介绍 Bootstrap Netty应用程序通过设置 bootstrap(引导)类开始,该类提供了一个用于应用程序网络层配置的容器.Bootstrap有两种类型,一种是用于客户端的Bootst ...

  10. 关于TCP主动关闭连接中的wait_timeout

    首先我们先来回顾一下tcp关闭连接的过程: 假设A和B连接状态为EST,A需要主动关闭: A发送FIN给B,并将状态更改为FIN_WAIT1, B接收到FIN将状态更改为CLOSE_WAIT,并回复A ...