How to setup SDL in Code::Blocks ?
There are few simple steps to setup SDL (Simple Directmedia Layer) in Code::Blocks and GCC MinGW Compiler. First of all make sure that Code::Blocks IDE is installed on your system properly. Follow the following procedure to setup SDL.
- Download SDL from http://www.libsdl.org/release/SDL-1.2.14-win32.zip .
- Decompress the archive.
- Copy SDL.dll from inside the bin folder to the your compilers bin directory (ie C:Mingwbin) This allows the compiler to find the dll at runtime time without having to put it in the same folder as your program or in the windows folder.
- Make a folder with name SDL in our C drive. Then copy lib and include folder from decompressed folder to SDL.
- Now open your Code::Blocks IDE.
- In start window, there you see a link for creating a new project
- Click on Create a new project link, then a dialog box will appear
- From Dialog box choose SDL project and click the Go button
- Give the name and path of the project and click the Next button
- Now Give the path of the SDL folder you have just created and Click Next
- Finally click the finish button and now you are ready to create your SDL project