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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lotios611

Pages: 1 2 [3]
31
Window / [SOLVED] Window Crashing
« on: December 05, 2009, 04:38:59 pm »
The program compiles, but when I go to run it, it says "Learning SFML has encountered a problem and needs to close." Here's the code:

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

////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600), "SFML Events");

// Start main loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();

                // Escape key : exit
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}
// Display window on screen
App.Display();
}

return EXIT_SUCCESS;
}

I know that the error happens when I create a window.

32
Window / [SOLVED] Window Crashing
« on: December 05, 2009, 04:00:06 pm »
Hello, I am trying to run the code on the tutorials about events using a window. I have the linker set up, but it still doesn't work. The most annoying thing is that I can get the System to work, but not Window.

Pages: 1 2 [3]