Microsoft Visual C++ 2005 Express Editions
From OpenTTD
This article gets you started on compiling OpenTTD using Microsoft Visual C++ 2005 Express Edition.
Contents |
[edit] Required software
Download these pieces of software. Then follow the installation instructions provided in this article.
- Microsoft Visual C++ 2005 Express Edition
- Microsoft® Windows® SDK
- Microsoft® DirectX® SDK
- Openttd-useful.zip, a collection of files of varying age.
- TortoiseSVN
- The newest source from
svn://svn.openttd.org/trunk; download with TortoiseSVN.
Note: This guide has been made on Windows XP with VTP applied. For Vista, see the guide for MSVC++ 2008 Express.
[edit] Alternative files
For the latest zlib, libpng and FreeType files you can browse their websites below.
While TortoiseSVN is great for SVN novices, some advanced developers prefer the command line SVN client:
[edit] Installation and setup
- Install Microsoft Visual C++ 2005 Express Edition. This should be fairly easy. Download it, run it and drink a beer while waiting ;)
- Install Microsoft Platform SDK. I recommend to install the same options way I did, so it won't use a lot of unnecessary space (see the images below).
[edit] Setting up includes and libraries
Now extract the Openttd-useful.zip file and copy:
- The contents of the
includefolder toC:\Program Files\Microsoft Visual Studio 8\VC\include.
- The contents of the
libraryfolder toC:\Program Files\Microsoft Visual Studio 8\VC\lib.
[edit] Setting up the DirectX SDK
Well, from the components screen remove the documentation and sample source code you'll save a lot of space (800+ MB). They're pretty useless if you just need to compile OpenTTD. Note:You should not use a version newer then August 2007 as DirectMusic is no longer support as of the November 2007 release.
[edit] Setting up the VC++ Directories
Go to Tools -> Options, then to Projects and Solutions -> VC++ Directories. Add the following lines:
Executable files:
- C:\Program Files\Microsoft Platform SDK\Bin
Include files:
- C:\Program Files\Microsoft Platform SDK\Include
- C:\Program Files\Microsoft DirectX SDK\Include
Library files:
- C:\Program Files\Microsoft DirectX SDK\Lib\x86
- C:\Program Files\Microsoft Platform SDK\Lib
Note: Please update the paths as necessary.
Only a few changes are required to use the Platform SDK with Visual C++ 2005 Express. Please follow steps 3, 4 and maybe 5 of the guide from Microsoft.
[edit] Compiling
Open projects/openttd_vs80.sln. This will open your IDE with the project loaded. If you want to compile a debug version straight ahead, press F7 and enjoy. To compile a non-debug version, go to Build -> Configuration Manager and select Release for OpenTTD. Press F7.






