SFML community forums

Help => General => Topic started by: Fuv on May 28, 2010, 10:08:08 pm

Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Fuv on May 28, 2010, 10:08:08 pm
Now I started making Window. I added necessary libs to linker output: sfml-window.lib and it compiles and links good, but after running I got msg:
Code: [Select]
Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.

I dont know what is going on. I read that its my code fault, but I copied it from tutorial:
Code: [Select]
#include <SFML/Window.hpp>

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

}


And error is becouse of the line in main(), becouse if i put it into comment program works good(doing nothing but works)

Kind Regards
Fuv
Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Mindiell on May 28, 2010, 10:21:59 pm
maybe an App.Close() can be a good idea, no ?
Is this really your main ? it's a bit empty
Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Fuv on May 28, 2010, 10:25:58 pm
Quote from: "Mindiell"
maybe an App.Close() can be a good idea, no ?


no, the problem still shows.

Quote
Is this really your main ? it's a bit empty



Yes. its all I have. Yesterday I started using SFML and I m using this tutorial:
http://www.sfml-dev.org/tutorials/1.6/window-window.php

Kind Regards
Fuv
Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Fuv on May 28, 2010, 10:35:29 pm
Even if I wrote in code(only it it main!):
Code: [Select]
sf::Window w;

i got the message box with error.
Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Laurent on May 28, 2010, 11:29:47 pm
Use debug libraries (with -d suffix) in debug mode. It's written in the tutorial.
Title: Run-Time Check Failure #2 - Stack around the variable 'App'
Post by: Fuv on May 30, 2010, 11:46:33 am
Yeah, its workin'. I should have read that tutorial more carefully. Thanks.

Kind Regards
Fuv