编译Visual Studio 2012的Qt 4.8.x [英] Compiling Qt 4.8.x for Visual Studio 2012

查看:218
本文介绍了编译Visual Studio 2012的Qt 4.8.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为Visual Studio 2012编译Qt(版本4.8.x)需要执行哪些步骤?



我已经仔细按照此问题(适用于VS 2010),但WebKit模块失败



我也看到了这个问题,它要求相同,但对于VS 2012 RC为什么我认为这不会是一个重复的问题)。此外,回答者说他编译了Qt for VS 2011测试版,所以有可能它不适用于VS 2012(RTM)。



我意识到至少有一个问题是没有时间, win32-msvc2012 目录 Qt \mkspecs 。我应该创建该目录并从 win32-msvc2010 复制文件,可能需要修改吗?



问题是我是否应该在开始编译之前对Qt源进行一些修改。

解决方案

Qt 4.8.3与Visual Studio 2012 x64 (也应与4.8.2一起使用)


  1. 安装草莓Perl


  2. 下载Qt 4.8.3源代码http://qt-project.org/downloads


  3. 前往 mkspecs\win32-msvc2010 。打开 qmake.conf 并更改:

      QMAKE_COMPILER_DEFINES + = _MSC_VER = 1600 WIN32 

    到:

      QMAKE_COMPILER_DEFINES + = _MSC_VER = 1700 WIN32 


  4. c> qt-everywhere-opensource-src-4.8.3-x64 \src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h 由 HashSet.h


  5. 开始VS2012 x64 Native Tools命令提示符


  6. 切换到Qt 4.8.3源目录(包含 configure.exe 的目录)


  7. p>执行:

      configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010 


  8. 其后:

      nmake 


BlueGo会自动下载Qt 4.8.3并使用VS2012 x64构建它: http://bluego.vertexwahn.de (也适用于VS2010 x64 )(它只是做我上面描述的自动)


What steps should I take to compile Qt (version 4.8.x) for Visual Studio 2012?

I already carefully followed the instructions in the accepted answer of this question (which is for VS 2010), but WebKit module failed to compile (I'm not sure if the error message was logged anywhere during compilation).

I also saw this question which asks the same, but for VS 2012 RC (which is why I thought this wouldn't be a duplicate question). Furthermore, the answerer says he has compiled Qt for VS 2011 Beta, so there's a chance it may not work for VS 2012 (RTM). The compilation takes a lot of time, which is why I have not tried it yet.

At least one problem I realized is that there's no win32-msvc2012 directory in Qt\mkspecs. Should I just create that directory and copy the files from win32-msvc2010, possibly with some modifications?

Another sub-question is whether I should make some modifications to Qt sources before starting compilation.

解决方案

Qt 4.8.3 with Visual Studio 2012 x64 (should also work with 4.8.2)

  1. Install Strawberry Perl

  2. Download Qt 4.8.3 source code from http://qt-project.org/downloads

  3. Go to mkspecs\win32-msvc2010. Open qmake.conf and change:

    QMAKE_COMPILER_DEFINES  += _MSC_VER=1600 WIN32
    

    to:

    QMAKE_COMPILER_DEFINES  += _MSC_VER=1700 WIN32
    

  4. Replace qt-everywhere-opensource-src-4.8.3-x64\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h by this HashSet.h.

  5. Start "VS2012 x64 Native Tools Command Prompt"

  6. Switch to Qt 4.8.3 source directory (the directory that contains configure.exe)

  7. Run:

    configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010
    

  8. Followed by:

    nmake
    

I programmed a tool called BlueGo which automatically downloads Qt 4.8.3 and builds it with VS2012 x64: http://bluego.vertexwahn.de (also works with VS2010 x64) (it just does what I described above automatically)

这篇关于编译Visual Studio 2012的Qt 4.8.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆