如何使用 Visual Studio 2012 和 Windows SDK 7.1 编译 VC++ 2010 项目

我在 C++ 中使用 VS2010 完成了很多项目.现在我们已经切换到 VS2012,但我们想继续使用 VS2010 运行时构建项目(我们需要支持 Windows XP).

I have a lot of projects done with VS2010 in C++. Now we have switched to VS2012 but we want to continue building the projects with the VS2010 runtime (we need to support Windows XP).

据我们了解,这可以使用 Windows SDK 7.1 来实现,因为那里有 VC 编译器,所以我们安装了它.VS2012 识别了 SDK,现在我们有了一个名为 Windows7.1SDKPlatform Toolset.

To our understanding this could be possible using Windows SDK 7.1 as the VC compiler is there so we installed it. VS2012 recognized the SDK and now we have a Platform Toolset named Windows7.1SDK.

在构建项目时出现问题,因为一些项目返回:

The problem comes when building the projects as some projects are returning a:

错误 MSB6006:CL.exe"退出,代码为 -1073741515.

error MSB6006: "CL.exe" exited with code -1073741515.

此外,依赖于 MFC 的项目也失败了.MFC 不适用于 Windows SDK?这是否意味着我们需要购买 VS2010 许可证才能将它们安装在具有 VS2012 的机器上,才能使用 VS2010 编译器进行构建?

Also, projects depending on the MFCs are failing too. MFCs aren't available with Windows SDK? Does this mean that we need to buy VS2010 licenses to install them on machines with VS2012 just to build using the VS2010 compiler?

提前致谢.

推荐答案

看起来根本不可能,主要是因为除了 VS2010 正在部署 MFC 库,而且我们有很多项目都在使用它们.

Looks like it's not possible at all, mainly because nothing but VS2010 is deploying the MFC libraries and we have a lot of projects using them.

我们必须购买 VS2010 和 VS2012 的许可证:S

We'll have to buy licenses for VS2010 and VS2012 :S

相关文章