This is a guide about how can you install
SDL Libraries for DevCpp Mingw.
Steps:
1. Download
SDL Libraries from the Internet or from
here.
2. Extract them.
3. Open the DevCpp.
4. Click on Tools -> Compiler Options -> Directories -> Binaries, add there the directory bin from the downloaded
SDL.
5.Tools -> Compiler Options -> Directories -> C or C++ Includes, add there the directory include from the downloaded
SDL.
6.Tools -> Compiler Options -> Directories ->
Libraries, add there the directory lib from the downloaded
SDL, and then click ok.
7. Create a new project
for using
SDL Libraries, and go to Project Options -> Parameters -> Linker -> Add there the following:
-lmingw32
-lSDL2main
-lSDL2
and then click ok, and you're good to go.
If after compilation you receive and error while opening the created executable, just copy from
SDL/bin the file named SDL2.dll into your created executable directory, or project directory.
While programming be sure you use: int argv, char** args, 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.
}
Also you can try:
SDL Libraries for Microsoft Visual StudioSDL Libraries for Codeblocks