makefilesdltrackersidrecompile

Recompiling goattracker2 on Windows 10


I recently downloaded goattracker2 on Windows 10 and after making some changes to the source code, I need to recompile the program to test it.

I don't have any experience with recompiling. I had a look at the documentation included in the readme-file:

  1. Recompiling

To recompile for Win32, you need the MinGW development environment, use the file src/makefile.win as makefile.

To recompile for Linux, use src/makefile.

In both cases you need the SDL development libraries in addition to the SDL runtime, see http://www.libsdl.org.

Compile first the utilities (datafile & dat2inc) from the src/bme directory, and place them to your path.

This leaves me with several questions, like

If anyone has experience with recompiling goattracker, can they provide a step by step tutorial for how to do it?


Solution

    1. Get MinGW (I recommend 32bit version) and install.
    2. Download and unpack the SDL Libraries from https://www.libsdl.org/ (depending on your version you might need SDL 1.x)
    3. The SDL Libraries (the *.a files) have to be added in the lib directory of MinGW installation directory (this might be different from the lib dir of MinGW, see this issue)
    4. The header files from SDL (SDL2/ directory MinGW) have to be put where MinGW can find them (this might be different from the include dir of MinGW, see this issue)
    5. Go to the src directory of goattracker and type make -f makefile.win