Installing Visual C++ 2005 Express

Notice

This article is outdated!
Instead of following the steps in this article, just download and install the newer Visual C++ Express editions which already include the Windows SDK (previously known as the Platform SDK).

This article will explain how you can install the freely available Visual C++ 2005 Express Edition together with the Windows SDK required to create Windows applications and use most of the code available on the ‘net.

If you’re interested in doing Windows game development in C++, Visual C++ 2005 Express is a great choice because it combines a world class IDE with the optimizing version of the Microsoft C/C++ Compiler. If you’re concerned with standards compliance, rest assured that Microsoft’s compiler is among the best.

More Information

History Lesson: Microsoft and the C++ Standard

The idea that Microsoft compilers have poor standards compliance is rooted in Visual C++ 6.0, which was shipped before the C++ ’98 Standard had been completed but lived well into the C++ ’98 era. Visual C++ 2005 doesn’t have such problems at all and is actually one of the best – if not the best – compiler in terms of ISO/ANSI C++ standards compliance. With Herb Sutter, Microsoft has also won a famous member of the C++ standards committee for its own development team (see ISO/ANSI C++ Standards Committee Secretary Herb Sutter Joins Microsoft’s Developer Division).

The only obstacle for game programmers is that the Express Edition of Visual C++ 2005 doesn’t include the Platform SDK, Microsoft’s collection of headers and libraries for windows development, including the all-time famous Windows.h. This article will guide you through the entire process of installing Visual C++ 2005 Express, setting up the Platform SDK and configuring your build environment.

Required Files

I’ll start by listing what files you’re going to need so you can download everything in advance:

Visual C++ 2005 Express Edition
Obviously, we’re going to need VC++ 2005 Express for this to work. Download it from here: Visual Studio Express: Downloads

Visual C++ 2005 Express Service Pack 1
The Service Pack fixes several issues VC++ 2005 had in its original state. You can find a download link on the VC++ 2005 Express download page by scrolling down to Step 3, or use this link: Visual C++ 2005 Express SP1

Visual C++ 2005 Express SP1 Update for Windows Vista
If you’re running Windows Vista, Microsoft recommends this update to solve some issues the 2005 versions of Visual Studio are having on Windows Vista. It’s listed on the VC++ 2005 Express download page as well. Here’s a direct link: Visual Studio 2005 SP1 Update for Windows Vista

Microsoft Windows SDK
This SDK is better known by its earlier name, the Microsoft Platform SDK. There are several variants of this, you can download a Web Installer, a full distribution or an ISO image. If you only want to install the VisualC++ Headers and Libraries, the web install is the best choice because it only downloads those components that are actually needed. Don’t worry about the title saying “Update for Windows Vista”, you can target any older Windows Version with newer SDKs. It’s also certainly not an Update, it’s the standalone updated SDK. Windows SDK Update for Windows Vista

That’s everything you’ll need to set up your C++ game development environment. Continue on the next page!

1. Install Visual C++ 2005 Express

This is actually pretty simple. Just run the installer you downloaded (if you want to save some time and space, deselect the MSDN Library and SQL Server Express. You can view MSDN online and install SQL Server Express when you actually need it).

2. Install Visual C++ 2005 Express SP1

Run the SP1 executable and wait for half an hour (no joke!)

3. Install Visual C++ 2005 SP1 Update for Windows Vista

…if you’re running Windows Vista. Otherwise, skip to step 4.

4. Install the Platform SDK

I’m going to assume you downloaded the ISO variant of the Platform SDK.
(If you downloaded the Web Installer, just run it and continue with Step 4.3.
If you downloaded the FULL SDK, you need to save all the .cab files in the same directory, run PSDK-FULL.exe and extract it into the folder you .cab files are in, then open a command prompt and extract the .cabs by navigating to their directory and running PSDK-FULL.bat <TargetDir>, where TargetDir is a folder you’ve got write access to (eg. not C:\Something on Vista) into which the Platform SDK files will be extracted. Run Setup.exe from there and continue with Step 4.3).

4.1. Mount the .img file in Daemon Tools

Chances are you already have Daemon Tools installed and know what to do. If not, download Daemon Tools from www.daemon-tools.cc, install and click on the tray icon (red with a lightning bolt in the middle), then choose Mount Image and browse for the .img file you downloaded.

4.2. Run Setup.exe

Screenshot of the Windows SDK installer selected in an explorer window

4.3. Install!

If you want to speed up the process a bit, choose “Custom” and deselect everything except for the Microsoft Windows Core SDK:

Screenshot of the Windows SDK installer with only the Core SDK selected

The final step will be to configure Visual C++ 2005 Express to use the files from the platform SDK. Please continue on the next page!

5. Configure Visual C++ 2005 Express

You can find the same instructions being given on the Microsoft site here: Using Visual C++ 2005 Express with the Microsoft Platform SDK. This article has more fancy screen shots, though :p

5.1. Open the Visual C++ Directory Settings

You can find these settings in the Visual C++ Options dialog that is opened by clicking on Options in the Extras menu:

Screenshot of the options menu in Visual C++ 2005 Express with the settings entry selected

Navigate to Projects and Solutions in the category list to the left and locate the VC++ Directories entry

5.2. Update your Include Directories

Unless you changed the installation directory, the Platform SDK will have been installed to $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2. So we need to point Visual C++ to this directory.

Select the “Include files” in the combo box to the right and replace the $(VCInstallDir)PlatformSDK\include entry with $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\Include.

Screenshot of the dialog used to configure the include directories in Visual C++ 2005

5.3. Update your Library Directories

Select the “Library files” in the combo box to the right and replace the $(VCInstallDir)PlatformSDK\lib entry with $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\Lib.

Screenshot of the dialog used to configure the library directories in Visual C++ 2005

That’s it!

Leave a Reply

Your email address will not be published. Required fields are marked *

Please copy the string e0hpyg to the field below: