Compiling the Doom 3 SDK under Windows

The Doom 3 SDKs are shipped with Solution and Project files for Visual C++ 2002. It is perfectly acceptable to use newer versions of Visual Studio. The individual sections below detail how to prepare for compilation.

The SDK shipped by id Software is a little "untidy". It has several build configurations that are not required to create an SDK based mod. You can download an alternative set of project files which have been cleaned up, are ready to use for Release and Debug builds. They are still in VS2002 format but are compatible with Visual C++ 2002/2003/2005/2008 already have the _CRT_SECURE_NO_DEPRECATE preprocessor definition and "Ignore C4627" setting. They also come with a Windows command script which creates the PK4 file in an automated build step whenever the DLL is updated.


Visual C++ 2010 Express Edition

Coming soon, tips on compiling the SDK with VC++ 2010

Visual C++ 2008 Express Edition

This is the previous free version of the Microsoft C++ compiler and its IDE (ISO Image). Unlike Visual C++ 2005 Express, there is no need to perform a seperate install of the Platform SDK to work with Doom 3.

Once installation is complete proceed as described below for Visual C++ 2005/2008.

Visual C++ 2005 Express Edition

This is an older free version of the Microsoft C++ compiler and its IDE (ISO Image). In addition to installing this you must install the Windows Platform SDK, without which you will be unable to build native Windows DLLs. You can use the PSDK install method described here, which is a minimal install to allow building of the Doom 3 SDK and includes step-by-step screenshots.

Once installation is complete proceed as described below for Visual C++ 2005/2008.

Visual C++ 2005/2008

It is simple to build the SDK using Visual C++ 2005/2008. Open the solution file and it will automatically upgrade the projects to the appropriate format.

The default configuration for Visual C++ 2005 is to generate warnings when "potentially unsafe" standard C runtime functions are used; strcpy() for example. The Doom 3 SDK makes extensive use of many of these standard C runtime functions so it is advisible to disable this warning. To do this you must define _CRT_SECURE_NO_DEPRECATE as a preprocessor definition. You can do this using the IDE but it is much less time consuming to manually edit the .vcproj files.

Open each .vcproj using your favourite (Unicode compatible) text editor and search/replace...
    Search for: _D3SDK
    Replace with: _CRT_SECURE_NO_DEPRECATE,_D3SDK

As well as the above issue Visual C++ 2008 adds a new warning C4627 relating to precompiled headers. However, there is a flaw in the path matching logic used to generate this warning. For the Doom 3 SDK this can be disabled. Open the solution and right-click on each project. Select 'Properties' and expand the tree to 'C/C++ , Advanced'. In the "Disable Specific Warnings" box enter 4627 for all configurations.

Visual C++ 2003

It is simple to build the SDK using Visual C++ 2003. Open the solution file and it will automatically upgrade the projects to the appropriate format.

Visual C++ .NET (2002)

This is the version which was originally used to build Doom 3 on Windows. Just open up the SDK project and compile!

Website design based on Melankolia template by Ercan K.