Building an SDL program in Pelles C
Now that you are done building SDL and putting it into Pelles C, you are ready to make SDL programs in Pelles C. Whenever you want to make a program using SDL, the following is the procedure you will use:
- Create a Project Create a new project (either a Win32 Console or Win32 Program).
- Include sdl.h Create your sdl program (i.e. write your source code), making sure that you #include <sdl.h>
- Set Compiler Options In Project->Project Options->Compiler, set the __cdecl calling convention from the drop down list. Also select the "Enable Microsoft extensions" option.
- Set Linker Options In Project->Project Options->Linker (if this doesn't show up you haven't created a project properly yet), add "sdl.lib" and "sdlmain.lib" (just write the filenames with a space separating them) to the list of "Library and object files".
Now you can build and execute your own SDL programs.
These instructions were checked for completeness and correctness as of 11 Aug 2007. If you have problems with them, please log on to our forum and we'll do our best to help.