Microsoft Visual C++ 2008 Express Editions
From OpenTTD
This article gets you started on compiling OpenTTD using Microsoft Visual C++ 2008 Express Editions.
Contents |
[edit] Required software
- Microsoft® Visual C++ 2008 Express Editions (current: Final)
- Microsoft® DirectX SDK - August 2007 or earlier (needed for DirectMusic, more later)
- Microsoft® DirectX SDK - November 2007 or later (current: March 2008)
- Openttd-useful.zip
- openttd_useful.zip is a collection of files of varying age. For the latest zlib, libpng and FreeType files you can browse their websites below.
- zlib
- GnuWin32 libpng
- GnuWin32 FreeType
- Openttd-useful.zip
- ...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:
- Command line version (Subversion 1.4.5 Win32 binaries)
- GUI TortoiseSVN
- 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).
[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).
[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
includefolder toC:\Program Files\Microsoft Visual Studio 9.0\VC\include\. - The contents of the
libraryfolder toC:\Program Files\Microsoft Visual Studio 9.0\VC\lib\.
- The contents of the
[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.exein an extra directory and you get a file calleddxsdk_aug2007.exe(yes that's right, both files have the same name). - Extract the second
dxsdk_aug2007.exein an extra directory. - Now copy following 9 files from
.\dxsdk_aug2007\dxsdk_aug2007\Include\toC:\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
- Extract (no double-click, do not install)
[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 Managerand selectRelease for OpenTTD. - Press
F7, or go toBuild -> Build Solution.
- Open
[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.



