我应该采取哪些步骤来为 Visual Studio 2012 编译 Qt(版本 4.8.x)?
我已经仔细遵循了这个问题的已接受答案中的说明(适用于 VS 2010),但 WebKit 模块无法编译(我不确定编译期间是否记录了错误消息).
我还看到了这个问题提出了相同的问题,但对于 VS 2012 RC(这就是为什么我认为这不会是一个重复的问题).此外,回答者说他已经为 VS 2011 Beta 编译了 Qt,因此它可能不适用于 VS 2012 (RTM).编译需要很多时间,这就是为什么我还没有尝试过.
我意识到至少有一个问题是 Qtmkspecs 中没有 win32-msvc2012 目录.我是否应该创建该目录并从 win32-msvc2010 复制文件,可能需要进行一些修改?
另一个子问题是我是否应该在开始编译之前对 Qt 源代码进行一些修改.
Qt 4.8.3 with Visual Studio 2012 x64(也应该适用于 4.8.2)
安装Strawberry Perl
从 http://qt-project.org/downloads
转到 mkspecswin32-msvc2010.打开qmake.conf并修改:
QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32到:
QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32将 qt-everywhere-opensource-src-4.8.3-x64src3rdpartywebkitSourceJavaScriptCorewtfHashSet.h 替换为 this .
启动VS2012 x64 Native Tools 命令提示符"
切换到Qt 4.8.3源目录(包含configure.exe的目录)
运行:
configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010后继者:
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 Qtmkspecs. 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)
Install Strawberry Perl
Download Qt 4.8.3 source code from http://qt-project.org/downloads
Go to mkspecswin32-msvc2010. Open qmake.conf and change:
QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32
to:
QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32
Replace qt-everywhere-opensource-src-4.8.3-x64src3rdpartywebkitSourceJavaScriptCorewtfHashSet.h by this HashSet.h.
Start "VS2012 x64 Native Tools Command Prompt"
Switch to Qt 4.8.3 source directory (the directory that contains configure.exe)
Run:
configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 C++ 中读取和操作 CSV 文件数据?How can I read and manipulate CSV file data in C++?(如何在 C++ 中读取和操作 CSV 文件数据?)
在 C++ 中,为什么我不能像这样编写 for() 循环:In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,为什么我不能像这样编写 for() 循环: for(
OpenMP 如何处理嵌套循环?How does OpenMP handle nested loops?(OpenMP 如何处理嵌套循环?)
在循环 C++ 中重用线程Reusing thread in loop c++(在循环 C++ 中重用线程)
需要精确的线程睡眠.最大 1ms 误差Precise thread sleep needed. Max 1ms error(需要精确的线程睡眠.最大 1ms 误差)
是否需要“do {...} while ()"?环形?Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?环形?)