Skip to content

SparCraft Linux Standalone Compilation

davechurchill edited this page Sep 12, 2014 · 5 revisions

SparCraft works in Linux via the bwapidata library! Linux is actually the easiest way to get SparCraft up and running.

Instructions

  1. Install the [Environment required libraries]

  2. Change directory to the SparCraft root directory

  3. Run the following command to compile (someone please give me a Makefile!):

    g++ -O3 source/.cpp bwapidata/include/.cpp source/glfont/*.cc -Ibwapidata/include -Isource/glfont -o SparCraft sdl-config --cflags --libs -lGL -lGLU -lSDL_image

  4. Run the following command for a sample experiment:

    ./SparCraft sample_experiment/sample_exp_linux.txt

= Headers =

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" }}}