jnrdev howto - setup devcpp and sdl - Florian Hufsky recently i switched from vc++ to devcpp. it's easier to use. starts faster and is open source.
but it was confusing to set up sdl on devcpp, so i've written this howto.
- DevCpp 4.9.9.0 (7.6 mb) (http://www.bloodshed.net/)
- SDL 1.2.7 mingw32 devel (0.7 mb) (http://www.libsdl.org)
just do it and remember the folder you've installed it to.
vixus (?) showed me an easy way to install sdl on devcpp: go to devpaks.org and download the sdl 1.2.7 devpak and install it.
here's the do it yourself way:
extract SDL-devel-1.2.7-mingw32.tar.gz to your devcpp folder.
make sure that the content gets directly in your devcpp folder and not to devcpp/SDL-devel/ etc.
to check if everything is where it should be see if libSDL.a is in devcpp/lib/.
startup DevCpp and go to File->New->Project.
choose Windows Application (stdout targets stdout.txt) or Console Application (stdout targets the console).
after you've created your project go to Project->Project Options (Ctrl+P) and open the Parameters tab.
under Linker add
-lmingw32 -lSDLmain -lSDL

it should look like this
as alternative you can just write
-lSDLmain -lSDL
and put
#ifdef main #undef main #endif
before your int main(...);
this will give you a console output window. the first solution works with output to stdout.txt.
now start coding and have fun.
Now enjoy your fresh DevCPP + SDL.
note that sometimes if you change stuff in a header devcpp doesn't recognize that it has to rebuild some sources. use Execute->Rebuild All (Ctrl+F11) in this case.
questions / critics / comments? forum