I'm using Visual Studio 2010 in Windows XP. Using the dynamically linked lib files, I get a "buffer overrun" error when I run the program.
It happens here: sf::Window App(sf::VideoMode(800,600,32), "Sfml Window");
I did include sfml-main.lib. Dependencies are listed in this order:
sfml-system.lib
sfml-window.lib
sfml-main.lib
The dll files are in the correct directory as well.
Any help would be appreciated.
Full source:
#include <SFML/Window.hpp>
using namespace sf;
int main()
{
Window App(VideoMode(800,600,32), "Sfml Window");
while(App.IsOpened())
{
Event Event;
while(App.GetEvent(Event))
{
if(Event.Type == Event::Closed)
App.Close();
if(Event.Type = Event::KeyPressed)
{
switch (Event.Key.Code)
{
case Key::Escape:
App.Close();
break;
}
}
}
App.Display();
}
return EXIT_SUCCESS;
}