Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Where's my window?  (Read 2132 times)

0 Members and 1 Guest are viewing this topic.

Haxel

  • Newbie
  • *
  • Posts: 3
    • View Profile
Where's my window?
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Where's my window?
« Reply #1 on: February 24, 2013, 08:43:59 pm »
Version of SFML?
Laurent Gomila - SFML developer

Haxel

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Where's my window?
« Reply #2 on: February 24, 2013, 08:57:39 pm »
Sorry, its 1.6

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Where's my window?
« Reply #3 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  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Haxel

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Where's my window?
« Reply #4 on: February 24, 2013, 10:00:04 pm »
Haha, right. And everything is different!

That's solved it. Thanks  ::)