VS 2010 and SFML : Access Violation Issue on window.display()

0

I have recently started using SFML on Visual c++ 2010. I have linked all of the libraries and included all of the required files but still when I run my "main.cpp" the compiler throws an Unhandled Exception i.e.

Unhandled exception at 0x00000000 in SFML.exe: 0xC0000005: Access violation executing location 0x00000000.

My program:

#include <SFML/Graphics.hpp>

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;
}
c++
visual-studio-2010
sfml
asked on Stack Overflow Mar 5, 2015 by Harajyoti Das • edited Jan 26, 2019 by Cœur

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0