Skip to content

Developer Getting Started: MinGW

Cong edited this page Nov 12, 2015 · 9 revisions

Prerequisites

Clone repo: GitHub for Windows

Instructions for TortoiseGit are also available; these are not recommended

  1. Optional: for the purposes of this walkthrough, the clone location is C:\cdogs-sdl. To make GitHub for Windows automatically clone to this location, set the default storage directory to C:\.

  2. Click the "Clone in Windows" button in the repo website.

  3. You should now see the repo contents in C:\cdogs-sdl

Install SDL development libraries

  1. From the contents of the SDL-2.0.XX package, copy the contents of bin to C:\MinGW\bin, include into C:\MinGW\include, and lib into C:\MinGW\lib (so you should have the files C:\MinGW\bin\sdl-config, C:\MinGW\include\SDL\SDL.h, C:\MinGW\lib\libSDL.dll.a etc.)

  2. Do the same for SDL_mixer and SDL_image, combining the contents of the include and lib folders. However, you should also copy the DLLs e.g. SDL_mixer.dll to C:\MinGW for CMake's benefit.

  3. Copy the .dll files to the C:\cdogs-sdl\src folder

  4. Create an environment variable SDLDIR that points to C:\MinGW

Run CMake

  1. Simply run C:\cdogs-sdl\make.bat

  2. If the last step didn't work, open CMake Windows and select File > Delete Cache, and start this section over.

  3. Run c:\cdogs-sdl\src\cdogs-sdl.exe. You are ready to go!