Difficulty with SDL on Windows with Code::Blocks

SDL defines its own main (or WinMain) function, possibly renaming your
"main" to something else. So as riksweeney already pointed out, you
need to link with SDLmain.lib or else get an undefined reference.

There’s also a tutorial available on the interwebs:
http://lazyfoo.net/SDL_tutorials/lesson01/windows/codeblocks/index.php