Monday, February 21, 2011

Setup SDL in code::block


TO create SDL Project in code::block,at first you have to download the sdl libary from this website  "http://www.libsdl.org/download-1.2.php" for windows downloaded zip file name must be "SDL-devel-x.x.x-mingw32.tar

Lets create SDL project
step 1:

first unzip the zip file
step 2:
now create a SDL folder in c  drive (c:\SDL).
And make two new folder inside SDL folder rename first as include and second as lib.

step 3:
copy the all file from the include folder of unzip file of step 1

and paste to the folder include "C:\SDL\include" which you have created in c directories
again copy all file from the lib folder of unzip file of step 1
and paste to the folder lib "C:\SDL\lib" which you have created in c directories
also copy the SDL.dll file from the bin folder of unzip file and paste it
inside "C:\Windows\System32" floder.



step 4:
Open the code block and create new project.


step 5:


From project wizard click on SDL project as above image.


click next

Enter project title name ,give path to save project and  project file name will create by default from project title name.
After that click next.

Now give the path for SDL folder that you have made in c:\SDL
Then click next.


click finish.
Finally project is created with sample program, built and run it you will see window as below.



If you see the output as above image then you successfully created the SDL project.



1 comment:

  1. i have problem with this step:

    Now give the path for SDL folder that you have made in c:\SDL
    Then click next.

    ReplyDelete