I am using VC++ 2010 on Win7 64-bit and SFML 1.6
When I use debug mode with the proper libraries (-d suffix) it always crashes and gives me this error:
"The application was unable to start correctly (0xc0150002). Click OK to close the application."
It will not run with the debug libraries.
But when I use the non-debug libraries it runs, but when it closes it gives this error:
"Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted."
In Release mode it is even worse it gives this 20 times
"A buffer overrun has occurred in TEST_.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'."
Here is the source:
#include <SFML/Window.hpp>
#include <iostream>
#pragma comment(lib, "sfml-system.lib")
#pragma comment(lib, "sfml-window.lib")
int main()
{
sf::Clock Clock;
sf::Window App(sf::VideoMode(800,600,32), "test");
while ( Clock.GetElapsedTime() < 10.0001f )
{
std::cout<<Clock.GetElapsedTime()<<"\n";
App.Display();
}
return 0;
}