it must be something related to codeblocks, maybe i should build it with xwgtk instead of wxwidgets or something?
No it's definitely not related to C::B !!
Code::Blocks is an IDE, not a compiler or a framework or anything like this.
If it does not work, it is most likely a configuration error.
I just dowloaded the example, created the sdl-sample with the wizard, replaced the original file with the one coming with the example and added
GL and
GLU to the link-libs (after having a look into the makefile).
I get a black-screen, that can be switched to fullscreen with F1 and an output of the framerate on the console, when running as console-program (otherwise I don't see the output).
That means everything works as I expected.