SFML community forums

Help => Window => Topic started by: Haxel on February 24, 2013, 08:18:31 pm

Title: Where's my window?
Post by: Haxel on February 24, 2013, 08:18:31 pm
Apologies if this has been answered before, I did search but I couldn't find the same problem experienced elsewhere..

I've just started using SFML, and I find that my very simple program will compile seemingly without errors, but won't appear to run any code. Take the example below:

#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
        std::cout << "hello sfml";
        getchar();
        sf::RenderWindow App( sf::VideoMode( 1024, 768 ), "my window" );

        ...

}

Now, I found that without any reference to sf (the last line commented out), the text is printed and the console window exits fine. But with the creation of the App window, nothing is printed, and I can't even catch the main function being hit in the debugger. The console window just sits there. So, I have no idea what's going wrong :/

I'm using VS 2008 Pro, I've added include paths for libs and dll's. It's quite a silly problem and really putting me off! Any thoughts greatly appreciated.

Cheers
Haxel
Title: Re: Where's my window?
Post by: Laurent on February 24, 2013, 08:43:59 pm
Version of SFML?
Title: Re: Where's my window?
Post by: Haxel on February 24, 2013, 08:57:39 pm
Sorry, its 1.6
Title: Re: Where's my window?
Post by: zsbzsb on February 24, 2013, 09:19:04 pm
Sorry, its 1.6
SFML 1.6 has a nasty ATI bug where if you have an ATI graphics card the window will not display. The only fix is to update to SFML 2.0  ;)
Title: Re: Where's my window?
Post by: Haxel on February 24, 2013, 10:00:04 pm
Haha, right. And everything is different!

That's solved it. Thanks  ::)