SFML community forums

Help => General => Topic started by: Portalboat on February 07, 2011, 07:20:07 am

Title: Access Violation in VS2010, but not in VS2008
Post by: Portalboat on February 07, 2011, 07:20:07 am
What the title says. I recently upgrading to VS2010, but when I try to run the program, it gives me an access violation. However, when I run the EXACT SAME code in VS2008, it doesn't crash, and it runs correctly. The program is just a basic main() function:
Code: [Select]
#include <SFML/Graphics.hpp>
int main()
{
//Create main window, using the best available resolution, and make the reference
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Window");

//Reference Classes

//This is the main loop, it will loop until you exit the system.
while (App.IsOpened())
{
//Here we process the events list
sf::Event Event;
while (App.GetEvent(Event))
{
//Close window: exit
if (Event.Type == sf::Event::Closed)
{
App.Close();
}
//Clear the screen with a color

//Here you will draw all of the stuff in the frame buffer

//Render the frame on screen
App.Display();
}
}
return EXIT_SUCCESS;
}


Why would it be glitching out like this?
Title: Access Violation in VS2010, but not in VS2008
Post by: Laurent on February 07, 2011, 07:29:02 am
You must recompiler SFML, the 2008 libs are not compatible with 2010.