Image

Setting up SDL with Visual Studio

Modified: 2008/06/24 18:22 by Caste - Uncategorized
Hey folks,

I'll just do this myself and follow the guide found here to set up SDL with Visual Studio.

Edit

Downloading and installing SDL

Go there and download the developement package which fits your IDE. I'm using VC Express 2005 so I need SDL-devel-1.2.13-VC8.zip. Extract this zip somewhere on your disk.

Now we need to find the folder where VC is installed, for me its C:\Program Files\Microsoft Visual Studio 8\VC. Now we copy all files from the extracted zip SDL\include to VC\include\sdl (you need to create this folder first). Do the same thing for the 2 libraries (*.lib) in "Path to SDL"\lib, but these go straight into VS's lib directory.

The sdl.dll from "SDL"\lib needs to be copied to C:\Windows\System32.

Edit

Configuring a NeHe lesson to run in VC

Go and get the VC download at the bottom of Lesson01. Extract it and open the project at \build\win\VC\lesson01.

Now try to compile. If it works, you're done!

If not, you probably need to set the path to the Platform SDK (if you haven't installed it, do that now!), I did. In VC, go to Extras->Options and choose Projects and Workspaces -> VC++ dirs . (Dunno whether its called exactly like that, I've got a german version) There you need to add "Path to your PlatformSDK"\Include to the Include dirs and "PlatformSDK"\Libs to your Library search path (the dropdown list to the upper left).

Given the case that you needed to specify the PlatformSDK path, you'll need to do that for every Lesson you want to compile.

Edit

Releasing SDL - OpenGL programs

If you want to create OpenGL demos or something like that, you need to ship sdl.dll with it, just put it in the same folder as the .exe.

Cheers

Caste @ NeHe-Team - June 11 2008

ScrewTurn Wiki version 2.0.27. Some of the icons created by FamFamFam.