在VS2013中使用Qt [英] Using Qt in VS2013

查看:820
本文介绍了在VS2013中使用Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现了Qt 5.2,它看起来很不错,虽然我有一个问题:我想在Visual Studio 2013中使用它。我下载了 Visual Studio Add-in 1.2.3 Alpha for Qt5 从Qt的官方网站。



我在Visual Studio 2013解决方案( Qt Application )中创建了一个项目,

 错误3错误LNK2038:检测到'_MSC_VER'不匹配:值'1700'不匹配值'1800' in moc_graphicalui.obj E:\Applications\SizeWrite\GraphicalUI\qtmaind.lib(qtmain_win.obj)GraphicalUI 

我已经读了一些东西,我想这是一个关于Stack Overflow的问题,但是我没有清楚地知道我要做什么,要解决这个问题。

:Windows 8.1 Pro x64






$ b b

IDE :Visual Studio 2013 Ultimate x86



解决方案

看起来这是一个问题,你的Qt安装,而不是VS Addin。我想你已经安装VS2012二进制文件( _MSC_VER = 1700 )而不是VS2013( _MSC_VER = 1800 )。看起来没有从 Qt下载页面 VS2013二进制文件可用,所以我建议从来源构建


I have recently discovered Qt 5.2, and it looks pretty nice for me, though I have a problem: I want to use it inside Visual Studio 2013. I downloaded the Visual Studio Add-in 1.2.3 Alpha for Qt5 from the Qt's official website.

I have created a project in my Visual Studio 2013 solution (a Qt Application) and when I try to compile it,

Error   3   error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in moc_graphicalui.obj E:\Applications\SizeWrite\GraphicalUI\qtmaind.lib(qtmain_win.obj)   GraphicalUI

I've already read something, I guess it was a question on Stack Overflow, but I didn't clearly understand what I have to do, to solve this properly. So, can anyone help me?

My OS: Windows 8.1 Pro x64

IDE: Visual Studio 2013 Ultimate x86

解决方案

It looks like this is an issue with your Qt installation rather than the VS Addin. I think you have installed the binaries for VS2012 (_MSC_VER=1700) rather than VS2013 (_MSC_VER=1800). It looks like there aren't yet binaries available for VS2013 from the Qt download page so I would suggesting building them from the sources.

这篇关于在VS2013中使用Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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