I would copy and paste the direct contents of your code. While it may not seem like your code has a problem it is very likely it can be. It happens all the time to programmers. We just know our code is right that nothing is wrong with it. Then we show it to someone else and they see it within 10 seconds. It can happen all the time in anything, not just programming. It's one of those things that happens when you look at something for too long. Sometimes you need a fresh set of eyes.
The chances of this being a Code::Blocks issue is very slim. If it compiles and links just fine and starts up then I don't see it being a Code::Blocks issue. I guess it is possible it could be something to do with the SFML files though first I'd want to see your code.
Next would be the project settings. I can assume it could be a possibility that your project settings aren't exactly right, though with just a basic SFML app I would think if you have it linked properly and it compiles fine then that would be fine too.
Seriously just copy and paste your code and we will do everything we can to try to help. We all make mistakes and we sometimes need fresh set of eyes to see the problem. If you have by chance fixed the issue then post your solution here. That way someone else who could be having the same problem could see and it could help someone else.
Without any of this information it's going to be nearly impossible to try to help you. That code you posted above, even though you said it was not a direct copy and paste (not sure why you wouldn't though), we immediately saw something.