SFML drawing

When I go to the sfml 2.2 tutorials and setup the example code I am unable to do so. I have linked everything and when I compile it I get a segmentation fault. How do I fix it? I am running lubuntu 14.10. Is it possible my hardware is too old for sfml, or should it still be capable on older hardware (older hardware being an Intel pentium 4 2.8 ghz processor and ati® radeon™ igp 345m graphics)? When I ran it the window would flash and it would show "segmentation fault (core dumped)" in the console. I believe I linked everything, before I added the line commented out it ran just fine. It is whenever I draw it to the screen, I followed a tutorial on youtube as well and when I was including a texture it ran fine detecting it but then I added the window.draw(sprite); and that is where I am having problems

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #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;
}


edit: I noticed from searching around the sfml fourms that others were having segfaults on Linux. Could it be the operating system that is causing me to be having the segfault?
Last edited on
You can post this in the SFML forum: http://en.sfml-dev.org/forums/

Aceix.
Topic archived. No new replies allowed.