SFML community forums

Help => General => Topic started by: Mr. X on November 29, 2008, 11:26:03 pm

Title: Stack arround variable is corrupted
Post by: Mr. X on November 29, 2008, 11:26:03 pm
Hello,
with this simple code:
 
Code: [Select]
#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:
Quote
Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.


I am using vc++ 2008 Express, if this helps.
Title: Stack arround variable is corrupted
Post by: Nexus on November 30, 2008, 12:09:56 am
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.
Title: Stack arround variable is corrupted
Post by: Mr. X on November 30, 2008, 10:29:21 am
Thank you, you're right.