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

Author Topic: New Window Crashing  (Read 1261 times)

0 Members and 1 Guest are viewing this topic.

FrozenKiller

  • Newbie
  • *
  • Posts: 5
    • MSN Messenger - FrozenKiller42@gmail.com
    • View Profile
New Window Crashing
« on: September 17, 2010, 12:52:32 pm »
Hello,

I have just started with SFML, and I am having trouble rendering a window. My code:

Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main()
{
   sf::RenderWindow Game(sf::VideoMode(800, 600, 32), "SFML Blank Window");

   sf::Event Event;

   while(Game.IsOpened())
   {
       while(Game.GetEvent(Event))
       {
           if(Event.Type == sf::Event::Closed)
               Game.Close();
       }

       Game.Clear();

       Game.Display();
   }

   return EXIT_SUCCESS;
}


It crashes on load. I am running Win7 64-bit, MSVC++ 2010, SFML 1.6 pre-compiled.

TIA

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
New Window Crashing
« Reply #1 on: September 17, 2010, 12:55:15 pm »
SFML is precompiled for VC++ 2008, you must recompile it with VC++ 2010.
Laurent Gomila - SFML developer

FrozenKiller

  • Newbie
  • *
  • Posts: 5
    • MSN Messenger - FrozenKiller42@gmail.com
    • View Profile
New Window Crashing
« Reply #2 on: September 17, 2010, 01:34:48 pm »
All working well after compiling under VC++ 2010. Thanks for your help.

 

anything