NewsAboutDownloadsChange LogWikiGitHubContact

Windows Step By Step Compilation

This is a basic, step-by-step guide to getting SLADE compiling in Windows, using Visual Studio Community 2019.

1. Setup and Install Tools

Install Visual Studio

Download Visual Studio 2019 Community from here. When installing, select 'Custom' installation and make sure to select 'Visual C++', 'Git for Windows' and 'GitHub Extension for Visual Studio'.

2. Setup Required Libraries

Create a folder somewhere on your hard drive to contain all the libraries and SLADE sources, if you don't already have something like this. For example purposes, this guide will assume the directory created is C:\Dev. Within this folder, create another one for all the libraries, eg. C:\Dev\Libs

wxWidgets

Download the latest wxWidgets (Windows 7z) release from here (currently 3.1.5). Extract the 7z to the libs folder, eg. C:\Dev\Libs\wxWidgets-3.1.0

Next, open the wxWidgets folder and open the file build\msw\wx_vc14.sln within.

On the toolbar there should be a dropdown menu with 'Debug' selected - change this to 'Release' instead, then select 'Build → Build Solution' from the menu.

SFML

Download the latest release of SFML from the SFML website. Make sure to get the one for Visual C++ 15 (32 bit).

Once it has downloaded, extract it to the libs folder, eg. C:\Dev\Libs

FluidSynth

Due to its reliance on GLib, FluidSynth is a huge pain to compile in Windows. Additionally, when it is compiled, anything using it will also need the GLib DLLs to run. This is obviously highly undesirable, but luckily there are precompiled binaries available that have GLib statically linked, meaning no extra DLLs are needed. These are included with the SLADE sources so no extra setup is required for fluidsynth.

FreeImage

Go to http://freeimage.sourceforge.net/download.html and download the 'FreeImage DLL' zip. Extract this to the libs folder eg. C:\Dev\Libs

{fmt}

Go to https://fmt.dev/latest/index.html and download the latest version (7.1.3 at the time of writing). Extract this to your Libs folder.

GLEW

Go to https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download to download this library and extract it, like the others, to your Libs folder.

mpg123

https://mpg123.de/download.shtml

zlib

bzlib

Lua

3. Download SLADE Sources

Run Visual Studio 2019. There should be a 'Team Explorer' section somewhere, but if not, open it by selecting 'Team Explorer' in the 'View' menu. In the team explorer section, click the plug icon at the top, 'Connect'. You should now see a 'Local Git Repositories' section.

Click 'Clone' and copy+paste the following URL into the text box that appears: https://github.com/sirjuddington/SLADE.git. In the path text box below, type or browse to where you want the SLADE sources to be, eg. C:\Dev\SLADE. Click 'Clone' to get the sources.

4. Setup and Compile SLADE

Now that we have the sources and git repository set up in Visual Studio, we can open the SLADE solution file and build it. Double-click the newly added repository to switch to it. You should now see the 'Home' at the top of the team explorer section, and two sln files in the 'Solutions' section. Double click SLADE.sln to open it.

Setup library path macros

So that Visual Studio knows where to look for the required libraries we downloaded earlier, you will need to set up some macros to point to them (the SLADE project file uses these macros to set include/lib directories).

  • Select 'View → Property Manager'
  • Open 'Release | Win32' and double click Microsoft.Cpp.Win32.user
  • Under the 'User Macros' section, click 'Add Macro'
  • Enter WXWIN for the name, and the directory you extracted wxWidgets to as the value, eg. C:\Dev\Libs\wxWidgets-3.1.5
  • Tick 'Set this macro as an environment variable in the build environment' and click OK
  • Repeat the above 2 steps for FREEIMAGE (C:\Dev\Libs\FreeImage) and SFML (C:\Dev\Libs\SFML-2.2-VS2013)
  • Click OK to close the property pages window
  • Right click Microsoft.Cpp.Win32.user and select 'Save'

  • Define a NOCURLmacro
  • Set up additional include folders for fmt and GLEW

This should set up all the needed macros to compile SLADE

Compile

Before compiling, make sure to select the 'Release' configuration in the toolbar (it will usually default to 'Debug'), unless you want to use the debugger. Note that the debug build is extremely slow compared to release.

Now select 'Build → Build Solution' in the menu and SLADE should begin compiling. If all goes well, you will find the executable and data in the dist folder.

You will also need the dll files that come with the SLADE official release: FreeImage.dll, libfluidsynth.dll and openal32.dll. All these should also be available in the relevant library folders you extracted them to earlier.