You can either use the precompiled libraries from the SDL Download web site , or you can build SDL yourself.
Create a project as a Win32 Application.
Create a C++ file for your project.
Add the SDL include
directory to your list
of includes in the menu:
Project|Settings|C/C++ tab|Preprocessor|Additional include directories
.
The "include directory" I am referring to is the
include
folder within the main SDL
directory (the one that this HTML file located
within.
Now we're going to use the files that we had created earlier in the Build SDL step.
Copy the following files into your Project directory:
Copy the following files into your Project directory, and add them to your Project as well:
(To add them to your project, right click on your project, and select "Add files to project")
(I believe that it's not necessary to actually copy the .lib files into your directory; you only have to be certain that you add them to your Project. If someone is so inclined, correct this document, or e-mail me , and I'll fix this document.)
Now create the basic body of your project.
The body of your program should take the following form:
#include "SDL/SDL.h"
int main( int argc, char* argv[] )
{
// Body of the program goes here.
return 0;
}
I hope that this document has helped you get through the most difficult part of using the SDL: installing it. Suggestions for improvements to this document should be sent to the writers of this document.
Thanks to Paulus Esterhazy (pesterhazy@gmx.net), for the work on VC++ port.
This document was originally called "VisualC.txt", and was written by Sam Lantinga .
Later, it was converted to HTML and expanded into the document that you see today by Lion Kimbro .