Skip to content

Configure Microsoft Visual Studio 2008 Express to also build for Windows x64

wyldckat edited this page Sep 2, 2012 · 2 revisions

Introduction

Microsoft Visual Studio 2008 Express comes by default with only compilation and building capabilities for creating 32bit applications for Windows. It's this way (probably) because:

  1. The Express editions are basic versions of the Professional/Standard editions of Visual Studio, but still pack the awesome power of debugging in Windows, as well as most of their optimization algorithms.
  2. Since they are basic editions, they provide IDEs for each language in separate environments.
  3. These basic editions are oriented to home users and small businesses who cannot afford to invest in a +500 USD application per workstation just to create a cheap application for Windows.
  4. ...And this might also be a way for potential users to stay away from GNU Gcc and MinGW... as well as away from Linux and Mac OS X... but this might just be the paranoia talking.
(Side note: seems that MSVC 2010 doesn't have these problems...)

Nonetheless, Microsoft does provide the tools for building 64bit applications, for both the x86_64 (AMD64) and Itanium (IA64) architectures! But the respective compilers only come included with the Windows SDK. And that SDK is tailored to work out-of-the-box with the Standard/Professional editions.

Therefore, only the inquisitive minds will try and figure out how this can work for Express. For those, unofficial informations have been compiled here: "Visual C++ 2008 Express Edition And 64-Bit Targets" on "Jen's Blog". It was based on that blog post that this wiki article has been written in a more wiki-way.

Installation Instructions

  1. Install the Windows SDK. It's available here - Download ISO for your windows machine: x86 (GRMSDK_EN_DVD.iso) or AMD64 (GRMSDKX_EN_DVD.iso). On older SDKs, both ISOs were necessary.
  2. Open the Registry editor (regedit.exe).
  3. Hack the necessary registry places:
    1. On Windows 32bit:
      1. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio\9.0\CLSID and export it to sdk_data_clsid.reg.
      2. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio\9.0\VC and export it to sdk_data_vc.reg.
      3. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress and also export the file to backup_msvc2008exp.reg, this time to keep a backup.
      4. Edit the files sdk_data_clsid.reg and sdk_data_vc.reg, to replace all occurrences of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio to HKEY_CURRENT_USER\Software\Microsoft\VCExpress. Save the files.
    2. On Windows 64bit:
      1. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual Studio\9.0\CLSID and export it to sdk_data_clsid.reg.
      2. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual Studio\9.0\VC and export it to sdk_data_vc.reg.
      3. Visit the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress and also export the file backup_msvc2008exp.reg, this time to keep a backup.
      4. Edit the files sdk_data_clsid.reg and sdk_data_vc.reg, to replace all occurrences of HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual Studio to HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\VCExpress. Save the files.
  4. Import the files sdk_data_clsid.reg and sdk_data_vc.reg, either from Regedit or by double-clicking on the modified files.
  5. Fix the broken config files:
    1. On Windows 32bit:
      1. Go to the folder C:\Program Files\Microsoft Visual Studio 9.0\VC\vcpackages and rename the file AMD64.VCPlatform.config to AMD64.VCPlatform.Express.config.
    2. On Windows 64bit:
      1. Go to the folder C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages and rename the file AMD64.VCPlatform.config to AMD64.VCPlatform.Express.config.
      2. The following steps don't seem to be always necessary. Check the next section first, to see if it works. If not, come back to this point.
        Recover broken DLL files:
        1. Visit the DVD/Installer from where you installed Windows SDK and open the file Setup\vc_stdx86.cab.
        2. Copy the file FL_VCProjectAMD64Platform_dll_* from inside Setup\vc_stdx86.cab to a temporary folder.
        3. Rename the copy to VCProjectAMD64Platform.dll.
        4. Now copy this file to the folder C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages.

Modifications are now complete. You may now start MSVC2008 Express once again and open/start a new project.

Creating an x64 Project

Now, whenever you want to create a 64bit version of your application, first you need the 32bit version to already be working or at least already exist. Then go to the menu Build » Configuration Manager and:

  1. On the Active Solution platform drop-down, select <New...>:
    • On the Platform drop-down, select x64.
    • On the Copy settings from drop-down, select Win32.
    • Check the box Create new project platforms.
    • Press the OK button to continue.
  2. Then it's just a matter of re-configuring things for the new platform, just as it was done for the 32bit version!

Clone this wiki locally