Visual Studio 2010 C++ Express

Install Instructions for .NET Framework SDK

 

Following are instructions for installing the .NET Framework SDK in Visual Studio 2010 Express and adding x64 platforms to an existing project in a manner similar to the more expensive Visual Studio editions.

IMPORTANT: If Visual Studio 2010 Service Pack 1 is applied after the .NET Framework SDK install, an additional update is required to restore the Visual C++ compilers and libraries that may have been removed. Information is available here.

Installing .NET Framework SDK

64-bit tools are not available on the Visual Studio 2010 C++ Express Edition by default. To enable 64-bit targets, install the .NET Framework SDK in addition to the Visual Studio 2010 Express Edition. Otherwise, the x64 solution platform is not available and a warning will occur if you open a project containing a 64-bit target.

Install the Windows SDK appropriate for your operating system. Use the "Install Now" or "Archive" links to get the SDK. There are downloads for Vista and Windows 7. You can optionally install the Windows Performance Toolkit, Debugging Tools, and Application Verifier. The Help is also optional.

After installing this package the x64 configurations can be created.

Adding x64 to Project Files

Open a Win32 project. Open the Configuration Manager from the Build menu. In the Active Solution Platform select New. For the New Platform select x64. Usually you will want to “Copy settings from Win32” and check “Create new project platforms”.

Open the Properties from the Project menu. There is a new configuration property that needs to be set for the linker to find the system libraries. Be sure the x64 platform is selected and change "Configuration Properties > General > Platform Toolset", to Windows7.1SDK. Otherwise you will get linker errors such as "LINK : fatal error LNK1104: cannot open file 'kernel32.lib'". This setting can also optionally be used for the Win32 platform.

The x64 configuration can now be compiled, but the compiles will place the files in the same directories as the Win32 compiles. To correct this the x64 compiles should be placed in an x64 directory using the $(PlatformName) macro.

Add the $(Platform) macro to “Configuration Properties > General > Output directory” so the entry becomes $(SolutionDir)$(PlatformName)\$(Configuration)\.

Add the $(Platform) macro to “Configuration Properties  > General> Intermediate Directory” so the entry becomes $(PlatformName)\$(Configuration)\.

Check the x64 “Configuration Properties > Linker > Debugging > Generate Program Database File” for $(ProjectDir)$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb.

Compile the project. If there are compile errors you may need to add the $(PlatformName) macro to other settings as well. For example, if there are user library files the macro may need to be added to “Configuration Properties > Linker > General > Additional Library Directories”.

You should now be able to compile both Win32 and x64 platforms in a manner similar to the more expensive Visual Studio editions.