Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DangerDays

Pages: [1]
1
General / Re: Segmentation Fault creating RenderWindow
« on: January 25, 2015, 06:58:55 pm »
No I haven't, I guess I need one?

2
General / Segmentation Fault creating RenderWindow
« on: January 25, 2015, 06:16:45 pm »
I've just installed SFML 2.2 on my raspberry pi.
I wrote this just to test it out:
#include <SFML/Graphics.hpp>
#include <stdio.h>
using namespace sf;

int main()
{
        puts("Starting...");

        RenderWindow window(VideoMode(500,600), "Why don't you get a job?");
        Event event;

        puts("Entering loop...");

        while (window.isOpen())
        {
                while (window.pollEvent(event))
                {
                        if (event.type == Event::Closed)
                                window.close();
                }

                window.clear(Color::Blue);
                window.display();
        }

        puts("All Done!");
}

The program compiles fine, but when i run it, it gives a Segmentation Fault on the line where I create the RenderWindow. I ran it in gdb and got this:
Program received signal SIGSEGV, Segmentation fault.
0xb6bf6604 in glXCreateContext () from /usr/lib/arm-linux-gnueabihf/libGL.so.1

Is this a problem with SFML? Or is the problem with libGL.so? Or am I missing something obvious?

Info: I'm using SFML 2.2, My OS is Raspian (I'm using a raspberry pi), and I'm using the dynamic libraries of SFML...

Thanks! :)

Pages: [1]