如何使用Qt5和Qt Creator 2.6.1与VS 2012的编译器? [英] How to use Qt5 and Qt Creator 2.6.1 with compiler from VS 2012?

查看:354
本文介绍了如何使用Qt5和Qt Creator 2.6.1与VS 2012的编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

官方下载仅包含VS 2010的Qt库5.0.0。我在VS 2012 Express尝试了它,但得到一个错误消息错误:LNK2038:不匹配检测到'_MSC_VER':值'1600'不匹配值'1700'...

The official downloads only include Qt libraries 5.0.0 for VS 2010 now. I tried them in VS 2012 Express but got an error message as "error: LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700'..."

我必须在VS 2012中安装VS 2010或编译Qt5的整个源代码吗?

Do I have to install VS 2010 or compile the entire source code of Qt5 in VS 2012?

更新: IDE是Qt Creator 2.6.1。我只使用VS 2012中的C ++编译器,因为在官方的下载中没有针对minGW的Qt库5.0.0 >

UPDATE: My IDE is Qt Creator 2.6.1. I only use the C++ compiler in VS 2012 because there are no Qt libraries 5.0.0 for minGW in the official downloads yet.

UPDATE-2(2013-1-1):今天看过,官方博客说:

我们还为5.0系列做了一些工作。我们
有我们想要修复的错误。我们目前没有MinGW的二进制
包(因为WebKit还没有使用它)和MSVC
2012(你需要从源代码编译),我们将处理
尽快提供这些。目前的计划是在1月底之前有一个
的第一个补丁级别版本5.0.1。

There are a few things we’re still working on for the 5.0 series. We have bugs that we want to fix. We currently do not have binary packages for MinGW (as WebKit doesn’t yet work with it yet) and MSVC 2012 (you’ll need to compile from source), and we’ll work on delivering these as soon as possible. The current plan is to have a first patch level release, 5.0.1, some time before the end of January.

UPDATE-3(2013-1-31): 那最后,但只添加Qt 5.0.1为MinGW 4.7。

UPDATE-3(2013-1-31): That comes finally, but only adds Qt 5.0.1 for MinGW 4.7.

UPDATE- 4(2013-7-06):经过漫长的等待,

UPDATE-4(2013-7-06): After a long wait, Qt 5.1.0 for Windows 32-bit (VS 2012, 511 MB) added.

推荐答案

您正在使用Qt 5.1.0 for Windows 32-bit(VS 2012,511 MB)右键 - 如果你想使用MS VC 2012编译器,你必须手动编译QT5库。本教程位于 http://qt-project.org/wiki/Building_Qt_5_from_Git
另一个选择是安装VS 2010并使用它,直到Digia将预编译VC 2012和MinGW库。如果您使用QT Creator作为主IDE,它应该足以安装VC 2010 Express。

You are right - if you want to use MS VC 2012 compiler, you have to compile QT5 libraries manually. The tutorial can be found on http://qt-project.org/wiki/Building_Qt_5_from_Git. Another option is to install VS 2010 and use it until Digia will make pre-compiled VC 2012 and MinGW libraries. If you use QT Creator as your primary IDE, it should be enough to install VC 2010 Express only.

这篇关于如何使用Qt5和Qt Creator 2.6.1与VS 2012的编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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