Skip to content

Developer Getting Started: Visual Studio

cxong edited this page Apr 4, 2013 · 35 revisions

Prerequisites

Clone repo

  1. Right-click where you want to clone the repo (e.g. C:\), select "Git Clone..."

  2. In clone dialog, enter the repo URL

  3. Cloning...

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

Install SDL/SDL_mixer development libraries

There are many instructions for installing SDL for visual studio, but unfortunately CMake's Windows SDL support is quite poor, so these instructions are designed to support CMake as well.

  1. Choose a location for the SDL libraries (e.g. C:\dev).

  2. Copy the contents of the SDL_1.2.XX subfolder to C:\dev (so you should have the folders C:\dev\include, C:\dev\lib etc.)

  3. For SDL_mixer, copy the contents of the include and lib folders to C:\dev (just SDL_mixer.h and SDL_mixer.lib).

  4. In C:\dev\lib, there are x86 and x64 versions of the same libraries. Copy the .lib files in x86 to the lib folder.

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

  6. Create an environment variable SDLDIR that points to C:\dev

Run CMake

  1. Run CMake: for "Where is the source code:" input C:\cdogs-sdl\src, and for "Where to build the binaries:" input C:\cdogs-sdl

  2. Click "Configure", choosing the right Visual Studio version (e.g. VS2012 is VS11); click Finish

  3. Click "Generate"; you should now see Visual Studio projects in C:\cdogs-sdl.