SDL is a free cross-platform multimedia development kit applicable to games, game sdks, demo software, simulators, MPEG players, and other applications.
You can go to the terminal.
1. Configure the path of the SDL header file and the Link Library in VC.
In the menu tools/options/Directores, set include files and library files to contain the corresponding SDL directories.
2. Create a Win32 console application project and add SDL. Lib sdlmain. lib to the object/library modules on the project/settings and link tab.
Or Add the following two lines of code to the source program:
# Pragma comment (Lib, "SDL. lib ")
# Pragma comment (Lib, "sdlmain. lib ")
3. Test SDL Configuration
# Include <stdlib. h>
# Include "SDL. H"
Int main (INT argc, char * argv [])
{
If (sdl_init (sdl_init_audio | sdl_init_video) <0) // initialize the audio and video SDL Library
{
Printf ("can not init SDL. \ n ");
Exit (1 );
}
Printf ("successful init SDL. \ n ");
Atexit (sdl_quit); // exit SDL
Return 0;
}