Visual Studio 2012平台工具集设置不正确 [英] Visual Studio 2012 Platform Toolset set Incorrectly

查看:939
本文介绍了Visual Studio 2012平台工具集设置不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++项目,我在VS 2010中创建,我现在运行它在2012年,但我仍然想使用2010年的编译器。所有我的其他项目在同一个解决方案是好的,但由于某种原因,这一个NMake文件转到Microsoft Visual Studio 11.0为MSBuild.exe而不是Microsoft Visual Studio 10.0喜欢它应该是。有人知道如何改变这一点吗?

I have a C++ project that I created in VS 2010 and I'm now running it in 2012, but I still want to use the 2010 compiler. All my other projects in the same solution are fine but for some reason this one NMake file going to Microsoft Visual Studio 11.0 for the MSBuild.exe instead of Microsoft Visual Studio 10.0 like it is supposed to. Does Anyone know how to change this?

通常我只打开vcxproj并进入platformtool集,并将其从11更改为10,但我的NMake文件不允许这样。

Normally I would just open the vcxproj and go to the platformtool set and change it from 11 to 10 but my NMake file won't allow that.

我认为问题在这里 -

I think the problem is here -

ClCompile:
c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\CL.exe /c...

它应该是

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\CL.exe /c...

但我不知道我需要改变来解决这个问题。

But I can't figure out what I need to change to fix that.

我也得到这个错误,我只是假设是由这个问题。

I am also getting this error which I am just assuming is caused by this problem.


C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "call build_qt.bat win32" exited with code 1.

I 确定有一个简单的方法来做到这一点,但我真的不能想出这一点。

I'm sure there is an easy way to do this, but I really can't figure this out.

有任何建议吗?

推荐答案

我不确定这是否有助于您的问题,但为了解决我的问题,如本博客文章所述: http://blogs.msdn.com/b/vcblog /archive/2012/06/15/10320645.aspx

I'm not sure if this helps your issue, but in order to fix my issue as described in this blog post: http://blogs.msdn.com/b/vcblog/archive/2012/06/15/10320645.aspx

我修改了我的.pri / .pro文件以包含这些值

I modified my .pri/.pro file to include these values

win32 {  
  QMAKE_LFLAGS += /SUBSYSTEM:CONSOLE,5.01
  QMAKE_CXX += /D_USING_V110_SDK71_

  LIBS *= -L"%ProgramFiles(x86)%/Microsoft SDKs/Windows/7.1A/Lib"

  INCLUDEPATH += "%ProgramFiles(x86)%/Microsoft SDKs/Windows/7.1A/Include"
}



我还使用这些标志重新编译Qt 5.0,只是为了安全虽然我不认为需要。

I also recompiled Qt 5.0 using those flags, just to be safe (although I don't think it was needed.

这篇关于Visual Studio 2012平台工具集设置不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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