[c++] How to compile a 64-bit application using Visual C++ 2010 Express?

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?

This question is related to c++ 64-bit visual-studio-express

The answer is


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.


And make sure you download the Windows7.1 SDK, not just the Windows 7 one. That caused me a lot of head pounding.


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


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


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.


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.


Download the Windows SDK and then go to View->Properties->Configuration Manager->Active Solution Platform->New->x64.


Examples related to c++

Method Call Chaining; returning a pointer vs a reference? How can I tell if an algorithm is efficient? Difference between opening a file in binary vs text How can compare-and-swap be used for a wait-free mutual exclusion for any shared data structure? Install Qt on Ubuntu #include errors detected in vscode Cannot open include file: 'stdio.h' - Visual Studio Community 2017 - C++ Error How to fix the error "Windows SDK version 8.1" was not found? Visual Studio 2017 errors on standard headers How do I check if a Key is pressed on C++

Examples related to 64-bit

Android Studio: /dev/kvm device permission denied How to printf a 64-bit integer as hex? Unable to install Android Studio in Ubuntu I cannot start SQL Server browser Class not registered Error Excel VBA Code: Compile Error in x64 Version ('PtrSafe' attribute required) MSOnline can't be imported on PowerShell (Connect-MsolService error) How to know installed Oracle Client is 32 bit or 64 bit? The application was unable to start correctly (0xc000007b) How to specify 64 bit integers in c

Examples related to visual-studio-express

Found conflicts between different versions of the same dependent assembly that could not be resolved What reference do I need to use Microsoft.Office.Interop.Excel in .NET? how to display toolbox on the left side of window of Visual Studio Express for windows phone 7 development? How do I get the serial key for Visual Studio Express? How to compile a 64-bit application using Visual C++ 2010 Express?