无法在Visual Studio 2013中添加Qt

问题描述:

我想在Visual Studio 2013中使用Qt。我安装了Qt版本5.0.2。然后,我将Qt添加到Visual Studio中。我将路径定义为Qt 5.0.2版本msvc2012_64。创建项目后,我构建了解决方案。它给出了该错误:无法在Visual Studio 2013中添加Qt

1>qtmaind.lib(qtmain_win.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in debar.obj 
1>c:\Users\sercan\documents\visual studio 2013\Projects\Debar\x64\Debug\\Debar.exe : fatal error LNK1319: 1 mismatches detected 

它与编译器版本有关吗?

+2

您已经下载了一个使用VS 2012(版本为“1700”)编译的Qt版本。这不能与用VS 2013(版本'1800')编译的应用程序链接。下载一个用VS 2013编译的Qt版本(例如[Qt 5.5](http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-windows-x86-msvc2013_64-5.5.0 。可执行程序))。 –

使用您的Qt工程文件,这个命令:

QMAKE -tp VC myprofile.pro

这将生成Visual Studio解决方案文件。在此解决方案中,为项目属性|调试|环境中的Qt添加任何必要的路径。路径= C:\ ASL0632 \ asl-qt-4.7.4.3 \ asl-qt-4.7.4.3 \ bin