Okay, I'm new to SFML, so it's most likely that I'm doing something wrong. But, regardless, here's the problem I'm having:
I followed the instructions on how to install SFML on Linux. Tested the clock test, all good. Next, I tried to create a window... and that's when the problem arose. The window opens for a fraction of a second, then closes and reports a segfault. In Eclipse I tried it as well, and it told me:
Failed to open a connection with the X server
Failed to open a connection with the X server
I then tried to install SFML via the software center, in case I had done something wrong... and then I started getting the error:
symbol lookup error: /usr/local/lib/libsfml-window.so.1.6: undefined symbol: _ZN2sf7Unicode11UTF8OffsetsE
Here's the code I'm trying to run:
#include <SFML/Window.hpp>
int main() {
sf::Window App(sf::VideoMode(800, 600, 24), "SFML Window");
sf::Event Event;
bool running = true;
while (running) {
while (App.GetEvent(Event)) {
if (Event.Type == sf::Event::Closed)
running = false;
}
App.Display();
}
return EXIT_SUCCESS;
}
Help would be much appreciated.