Using SDL in Dev-C++

For a detail tutorial of how to use SDL in Dev-C++ , please visit :

Simple DirectMedia Layer
Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."

 1. Download SDL from official website , or from this page ( see attachments below)
 2. Extract them to a local directory
 3. Open DEV-C++ -> Tools - > Compiler options -> Compiler
        - Check "Add these commands to the linker command line"
        - Add "-lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf"
            (That is a dash and a letter L in lowercase , then come with the file name of dll.)
        - Configure Binaries , Libraries , C and C++ includes file of SDL to DEV-C++
 4. Installation Done !

The most tricky part is step 3.    Make sure add the command to linker when
you are new add a dll.    Else , you'll got a linker error.

[Useful Link about SDL Tutorial]

This contains core SDL library and head file.    Allow user to create a window ,
load & blit a bmp image file in the window , handle mouse , keyboard , and
gamepad event.
This library may allow user load various image file such as JPG , GIF , PNG , etc.
Support sound format such as wav , mp3 , ogg , etc.
This can load ttf font for your program.

Bdragon Ho,
Aug 1, 2009, 6:27 PM
Bdragon Ho,
Aug 1, 2009, 6:28 PM
Bdragon Ho,
Aug 1, 2009, 6:30 PM
Bdragon Ho,
Aug 1, 2009, 6:32 PM