Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure SDL 2.0 to be used with Visual Studio 2012?

I found a tutorial here: http://twinklebeardev.blogspot.com/2012/07/lesson-0-setting-up-sdl.html

However, I'm not experienced enough to be able to follow these directions. Can anyone help me out with an in depth step by step explanation?

I've already downloaded the three files found here: http://www.libsdl.org/index.php

like image 878
Man Avatar asked Jun 23 '13 11:06

Man


1 Answers

  1. Create an empty VS2012 project ("sdl-test") in c:/temp. I recommend unchecking "Create directory for solution".
  2. Download SDL2-devel-2.0.0-VC.zip
  3. Extract contents of SDL2-devel-2.0.0-VC.zip/SDL2-2.0.0/lib/x86 into c:/temp/sdl-test/lib
  4. Extract contents of SDL2-devel-2.0.0-VC.zip/SDL2-2.0.0/include into c:/temp/sdl-test/include/SDL2
  5. Open Configuration Properties
  6. Add include to C/C++ -> General -> Additional Include Directories
  7. Add lib to Linker -> General -> Additional Library Directories
  8. Add SDL2main.lib and SDL2.lib to Linker -> Input -> Additional Dependencies
  9. Change Linker -> System -> SubSystem to Console or Windows.
  10. Add code, using #include <SDL2/SDL.h>.
  11. Copy lib/SDL2.dll to your Debug and Release output directories.
like image 156
genpfault Avatar answered Sep 24 '22 10:09

genpfault