SFML community forums
Help => General => Topic started by: Mr. X on November 29, 2008, 11:26:03 pm
-
Hello,
with this simple code:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main() {
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
bool Running = true;
sf::Event Event;
while (Running) {
while (App.GetEvent(Event)) {
if (Event.Type == sf::Event::Closed)
Running = false;
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
Running = false;
}
App.Display();
}
return EXIT_SUCCESS;
}
I get this error when I exit the programm:
Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.
I am using vc++ 2008 Express, if this helps.
-
You propably link to the wrong libraries. Make sure you use the libs with "-d" suffix in debug mode, and the ones without in release mode.
-
Thank you, you're right.