
- Download and install Windows Software Development Kit (SDK). Microsoft Windows SDK for Windows 7.
- Once, Win7 SDK is installed, let’s start to develop a simple 64-bit hello world console application now.
- Run your VS C++ 2010 Express and create a new Win32 Console Application. I called the project “64BitHelloWorld”
- Enter the following code in 64BitHelloWorld.cpp
- Your code is ready BUT it’s not for 64-bit platform now. Let’s configure the project settings now so that it will compile using 64-bit compiler.
- Right click the project to open the project’s property pages
- In [General -> Platform Toolset], change the platform toolset from v100 to Windows7.1SDK
- Click Configuration Manager to open the Configuration Manager Dialog Box.
- Click the Active Solution Platform list, and then select the
option to open the New Solution Platform Dialog Box. - Click the Type or select the new platform drop-down arrow, and then select a 64-bit platform. I am using x64 in this tutorial.
- Click OK. The platform you selected in the preceding step will appear under Active Solution Platform in the Configuration Manager dialog box.
- Click Close in the Configuration Manager dialog box, and then click OK in the project property pages dialog box.
- Try to compile the 64BitHelloWorld project now and it should successfully build for 64-Bit platform now.
1 2 3 4 5 6 7 8 9 10 11 | #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { cout << "Hello World in 64-Bit!" << endl; getchar(); return 0; } |
Configure Visual C++ Projects to Target 64-Bit Platforms