Development: Compiling the code
If you want to get involved with OpenMPT development, or just want to compile your own version of the tracker, here are some hints on how to get started.
- Visual Studio 2013 or later (Express will not work as it does not include MFC, but the Community Edition will). You may also require the ANSI MFC legacy pack - a compiler error message will give you instructions if this is missing.
- Optional TortoiseSVN or any other SVN client. You will need this to get the latest code revision via the SVN system. The description below is written for TortoiseSVN. You can also download a code snapshot if you do not want to install a SVN client (see below).
Getting the code
Using TortoiseSVN: First, you have to create a directory on your hard drive in which you want to place the source code. Right-click on the directory and choose the context menu entry “SVN Checkout...”. The “Repository URL” to fill in is
https://source.openmpt.org/svn/openmpt/trunk/OpenMPT/. After clicking the OK button, all files will be downloaded.
- or -
Tarball: If you do not want to use an SVN client, simply get the GNU tarball from the web interface - click the “Download” link next to the
OpenMPT folder to retrieve it.
Once you have checked out, you can always right-click on the directory and choose “SVN Update...” to get the most recent revision of the code. This will of course not work with the tarball method, you will have to download a new tarball after every commit in that case.
For legal reasons, the ASIO and VST SDKs are not included in the OpenMPT code repository, but they are required to compile OpenMPT with ASIO and VST support. The required packages can be downloaded automatically by running the file
build/download_externals.cmd. Using this script requires PowerShell, so only works out of the box on Windows 7 or newer. Alternatively, you can retrieve them manually:
- Download the respective SDKs from the Steinberg website.
- VST: Simply copy all files from
include/vstsdk2.4/pluginterfaces/vst2.xand the content of
- ASIO: Copy the
ASIOSDK2folder into the
includedirectory of OpenMPT.
Compiling the code
Open the file
xx matches your Visual Studio version) in Visual Studio and click on the menu item
Build solution to compile the code. Note that this process may take quite a while!
Depending on the version of Visual Studio used, the code might not compile out of the box. Some known reasons for that are:
- You forgot to download the VST 2.4 and ASIO SDKs. Read the previous section to find out which files you need. Alternatively, if you do not want to compile OpenMPT with VST and ASIO support, you can define the constants
NO_ASIOin the file
#definestatements are already present but commented out).
- File dsound.h / dmoreg.h not found: You need the DirectX SDK. Alternatively, you can remove the
#define MPT_WITH_DSOUNDand uncomment
#define NO_DMOin the file
common/BuildSettings.h. Installing this before installing Visual Studio could spare you some work with setting up the paths. If that is not possible anymore, go to
Optionsin Visual Studio and then
VC++ Directoriesand add the required paths. Apparently, this is already installed with VS2010, depending on what components you install.