Monday, February 21, 2011

Setup SDL 1.2 version in code::block

Visit SDL download page and Download file SDL-devel-1.2.15-mingw32.tar.gz (Mingw32) from the Development Libraries section for your respective machine Win32/Linux. If you are using Visual C++ compiler in Code:blocks then download another file for Visual C++. Required links are highlighted in the screenshot below:

Steps to create SDL project in Code::blocks:
Step 1: Extract downloaded  zip file (SDL2-devel-x.x.x-mingw.tar).

Step 2: Create folder in any directory and give a name SDL 1.2 (eg. c:\SDL 1.2).

Step 3: Browse extracted files in step 1. Copy "include" and "lib" folders and paste it inside the directory that you have created in step 2. Also, copy SDL.dll file from bin folder to "C:\Windows\System32" folder.
Step 4: Open the code::block and go to File -> New -> Project or click create a new project link from the start page.
Step 5: From project wizard select "SDL project" and click Go button and provide all necessary information.

After creating a project, built and run the default program.

You can follow the video below to know the steps in detail:

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.