Sign in to follow this  

SFML Unhandled Exception error (Visual Studio 2013)

This topic is 1086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi so im using windows 8.1 with visual studio 2013 c++ and i installed sfml following http://www.sfml-dev.org/tutorials/2.2/start-vc.php in the exact way and i get an Unhandled Exception error 

the code that im trying to run is the simple example given at the bottom of the web page :

 

 

 

#include <SFML/Graphics.hpp>
using namespace sf;
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
 
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
 
window.clear();
window.draw(shape);
window.display();
}
 
return 0;
}

 

 

what am i doing wrong here ???

Share this post


Link to post
Share on other sites
You're accessing a null pointer. Don't do that.

Don't know where, in your code, but maybe you didn't initialize something you were supposed to. Edited by Washu

Share this post


Link to post
Share on other sites
its not even my code its the test example on the sdl tut site i dont know any sdl yet

Share this post


Link to post
Share on other sites

If you linked to the .dll's, did you link to the correct versions?

That is, if you're compiling and running in Debug, did you link to the debug .dll's?

Share this post


Link to post
Share on other sites
Sign in to follow this