-
Notifications
You must be signed in to change notification settings - Fork 177
SparCraft Windows Standalone Compilation
David Churchill edited this page Apr 17, 2016
·
4 revisions
It is quite easy to use SparCraft as library for creating standalone Windows executables.
To use SparCraft, you must include its headers. Make sure your project includes the SparCraft/source
directory, and from within your program use the following:
#include "SparCraft.h"
To compile SparCraft as a standalone Windows exe, you must have the following:
- Visual Studio 2013 (or any with v120 toolset)
- BWAPI 4.12
- SDL2 / SDL2_image (if you want to use the OpenGL GUI)
SparCraft uses the BWAPI library to obtain StarCraft data, and as such you must compile / link it with BWAPI 4.12 headers and binaries.
To build SparCraft.lib
:
- Install Visual Studio 2013 (or newer)
- Set BWAPI_DIR environment variable to your BWAPI folder
- Launch Visual Studio 2013
- Open
SparCraft/VisualStudio/SparCraft.sln
- Build
SparCraft
project (createsSparCraft.lib
)
To build and run the main SparCraft.exe:
- Build
SparCraft_main
(createsSparCraft.exe
) - Run
SparCraft/VisualStudio/Release/SparCraft.exe CONFIGFILE
from a terminal