0

I am using VC++ 2010 and I am trying to use SFML 1.6. I am trying to create a simple window. I am using Release mode because debug never works I get the error shown here
http://img529.imageshack.us/img529/8281/captureers.png

Release works, but when I close the window it gives me these errors:

Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.

and

A buffer overrun has occurred in SFMLTest01.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.

and
SFMLTest01.exe has triggered a breakpoint

I have linked all required libraries (sfml-system.lib, sfml-window.lib)

Here is my code

#include <SFML/Window.hpp>

int main(int argc, char* argv[])
{
	sf::Window App(sf::VideoMode(800, 600, 32), "Test Program");

	while ( App.IsOpened() )
	{
		sf::Event Event;
		while ( App.GetEvent(Event) )
		{
			if ( Event.Type == sf::Event::Closed )
			{
				App.Close();
			}
		}

		App.Display();
	}

	return 0;
}

Edited by Dark Byte: n/a

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.