Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile VC++ 2010 projects using Visual Studio 2012 and Windows SDK 7.1

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).

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:

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

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?

Thanks in advance.

like image 204
Ignacio Soler Garcia Avatar asked Jun 19 '12 15:06

Ignacio Soler Garcia


2 Answers

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.

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

like image 195
Ignacio Soler Garcia Avatar answered Oct 10 '22 06:10

Ignacio Soler Garcia


I would try raise the msbuild verbosity level (it is in Tools->Options->Project and Solution-> MSBuild) and check out the command of CL.exe with full parameters. Then check if it is different from what you saw on VS2010.

like image 1
bryanch Avatar answered Oct 10 '22 05:10

bryanch