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

Author Topic: Stack arround variable is corrupted  (Read 2282 times)

0 Members and 1 Guest are viewing this topic.

Mr. X

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Stack arround variable is corrupted
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Stack arround variable is corrupted
« Reply #1 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Mr. X

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Stack arround variable is corrupted
« Reply #2 on: November 30, 2008, 10:29:21 am »
Thank you, you're right.