Reputation: 73195
Is there a simple way to compile a 64 bit app with the 32-bit edition of Visual C++ 2010 Express? What configurations, if any, are necessary?
Upvotes: 130
Views: 177393
Reputation: 381
As what Jakob said: windows sdk 7.1 cannot be installed if MS VC++ x64 and x86 runtimes and redisrtibutables of version 10.0.40219 are present. after removing them win sdk install is okay, VS C++ SP1 can be installed fine again.
Kind regards
Upvotes: 2
Reputation: 8197
Programming in a 64-bit environment is quite different than 32-bit environment. Code generated has totally different assembly constitution in 32 & 64-bit code, even the protocols of communicating with functions change. So you can't generate 64-bit code using 32-bit compiler.
You might want to see an article on Microsoft's web site about targeting a 64-bit target but using a 32-bit development machine.
Upvotes: 3
Reputation:
Note that Visual C++ compilers are removed when you upgrade Visual Studio 2010 Professional or Visual Studio 2010 Express to Visual Studio 2010 SP1 if Windows SDK v7.1 is installed.
For instructions on resolving this, see KB2519277 on the Microsoft Support site.
Upvotes: 5
Reputation: 2846
Here are step by step instructions:
These steps have worked for me, anyway. Some more details on step 2 can be found in a reference from Microsoft that a previous poster mentioned: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx.
Upvotes: 182
Reputation: 348
And make sure you download the Windows7.1 SDK, not just the Windows 7 one. That caused me a lot of head pounding.
Upvotes: 14
Reputation: 2846
I found an important step to add to this - after you've installed the SDK, go to your project properties and change Configuration Properties->General->Platform Toolset from v100 or whatever it is to Windows7.1SDK. This changes $(WindowsSdkDir) to the proper place and seemed to solve some other difficulties I was encountering as well.
Upvotes: 9
Reputation: 41
Download the Windows SDK and then go to View->Properties->Configuration Manager->Active Solution Platform->New->x64.
Upvotes: 4
Reputation: 123831
64-bit tools are not available on Visual C++ Express by default. To enable 64-bit tools on Visual C++ Express, install the Windows Software Development Kit (SDK) in addition to Visual C++ Express. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ Express.
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
Ref: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
Upvotes: 49