I can compile this code fine in Codeblocks with Mingw. I don't get any compile errors. I'm pretty sure I have all of my settings fine. However when I run it instead of opening a window it just says the exe has stopped working.
I've compiled SFML to work with VC2010 now. I'm not going to work with SDL until I've become half way decent with C. I know, I know, you don't have to know C to use it. It's just a personal preference of mine since SDL is more C like, and SFML more c++ like. SDL is lower level and I think it will be important to learn it eventually.