This guide is about how can you install sdl libraries for codeblocks:
1. Download SDL Libraries for Mingw, from the internet, or from here
2. Extract them somewhere on your drive.
3. Open Codeblocks, and go to Settings -> Compiler -> Search directories -> Compiler, and add there the location of your SDL library directory and the include folder.
4. Go to Settings -> Compiler -> Search directories -> Linker, and add there the location of your SDL library directory and the lib folder.
5. Go to Settings -> Compiler -> Linker Settings -> Other linker options -> and add the following:
After you compile a file be sure you open the executable file in a directory with SDL.dll which you can find also in the SDL Library directory/bin.
Also if you encounter messages with missing dll files while trying to open your executable, download them from the internet.
While programming be sure you use: int argc, char** argv, as arguments for the main function, otherwise you will encounter compilation error something such us: undefined reference to SDL_main, if your compiler is friendly enough.
int main(int argv, char** args)
Write here the code.
To use OpenGL add these lines to Settings -> Compiler -> Linker Settings -> Other linker options:
These libraries are installed by the Codeblocks, so you don't need to download anything.
You can also try:SDL Libraries for Mingw DevCppSDL Libraries for Microsoft Visual Studio