This guide is about how to install the SDL Libraries on Microsoft Visual Studio 2010, 2012, 2013 etc.
Steps:
1. Download SDL from the Internet or from
here.
2. Open Microsoft Visual Studio
3. Create a project.
4. Go to the project's proprieties -> VC++ Directories -> Click on Include Directories -> Edit and add there the location of the include folder of SDL.
5. Then add the location of the libraries folder of SDL, in the same way.
6. On the Project's Proprieties, search for Linker, expand the list, go to Input -> Additional Dependencies -> Click on it -> Edit -> Add the libraries: SDL2.lib, SDL2main.lib
7. On the Project's Proprieties, search for Linker, expand the list, go to System -> Search for SubSystems -> Set on Console, click ok.
While programming be sure you use: int argv, char** args, as arguments for the main function:
int main(int argv, char** args)
{
Write here the code.
}
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.
Also you can try:
SDL Libraries for Mingw DevCppSDL Libraries for Codeblocks