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!