SFML Problem

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.

#include <SFML/Window.hpp>
int main()
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    bool Running = true;
    while (Running)

    return EXIT_SUCCESS;
It can get a lot more involved than that from my experience with SFML.
What Code::Blocks version are you using?
What SFML version are you using?
And most importantly what compiler and which version?

If your compiler is GCC 4.7.1, you need to recompile SFML for yourself, because it won't work otherwise
Last edited on
I'm using 12.11, I think it might be GCC, I'm not sure how to check which version of GCC I have -_-. I'm considering just using openGL, I've heard that it works great for 2d also.
closed account (3CXz8vqX)
If you want 2d, I recommend SDL, LazyFoo has some interesting tutorials on the matter.
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.
Stick with SFML, Austin. It's better, IMO.

Although it probably would have been better for you to use SFML 2.0 instead of 1.6. But that's alright.

As for your problem... Did you actually compile SFML yourself? If you just downloaded and are using premade dll's/lib's that's probably your problem.

I made an extremely detailed step by step of how to install and set up SFML 2.0 here, if interested:

Topic archived. No new replies allowed.