Microsoft Visual C++ 2008 Express Editions

From OpenTTD

Jump to: navigation, search

This article gets you started on compiling OpenTTD using Microsoft Visual C++ 2008 Express Editions.

Contents

[edit] Required software



...and of course the newest source from svn://svn.openttd.org/trunk. You have to have a SVN-client to download the source. Pick either of the following two. For SVN novices TortoiseSVN is highly recommended:


Note: This guide has been made on Windows Vista 32bit.

[edit] Installing

[edit] Microsoft® Visual C++ 2008 Express Editions

If you just need to compile OpenTTD it's enough if you don't select any options (see the image below).
Image:Microsoft_Visual_Cpp_2008_Express_Editions.png

[edit] Microsoft® DirectX SDK

Install the version November 2007 or later
From the components screen remove the documentation and sample source code you'll save a lot of space. They're pretty useless if you just need to compile OpenTTD (see the image below).
Image:Microsoft_DirectX_SDK.png

[edit] Copying from OpenTTD needed includes and libraries

[edit] openttd_useful.zip

Now extract the Openttd-useful.zip file and copy:
  • The contents of the include folder to C:\Program Files\Microsoft Visual Studio 9.0\VC\include\.
  • The contents of the library folder to C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\.

[edit] Microsoft® DirectX SDK - August 2007

Information: The DirectX SDK from November 2007 is the first one which supports Microsoft® Visual Studio 2008. But it's also the first version which doesn't support DirectMusic which is needed to compile OpenTTD. That is why we must copy the missing files from an older version, preferably the final one for DirectMusic: 'August 2007'.
  • Extract (no double-click, do not install) dxsdk_aug2007.exe in an extra directory and you get a file called dxsdk_aug2007.exe (yes that's right, both files have the same name).
  • Extract the second dxsdk_aug2007.exe in an extra directory.
  • Now copy following 9 files from .\dxsdk_aug2007\dxsdk_aug2007\Include\ to C:\Program Files\Microsoft DirectX SDK (November 2007)\Include (note: Please update the paths as necessary):
    • dls1.h
    • dmdls.h
    • dmerror.h
    • dmksctrl.h
    • dmplugin.h
    • dmusbuff.h
    • dmusicc.h
    • dmusicf.h
    • dmusici.h

[edit] Compiling

  • Open projects/openttd_vs90.sln. This will open your IDE with the project loaded.
  • To compile a non-debug version, go to Build -> Configuration Manager and select Release for OpenTTD.
  • Press F7, or go to Build -> Build Solution.

[edit] Credits

  • OpenTTD Developers for the great game.
  • Microsoft® for the the SDKs and Visual C++ 2008 Express Edition.
  • Sebastian and Desolator (aka Mircea Chirea) for creating/updating the Microsoft® Visual C++ 2005 Express guide.
Personal tools