I'm trying to get SFML working on LinuxMint 18, the Cinnamon version, but I get a segmentation fault, whenever I use sf::RenderWindow.
I installed SFML 2.4.2 by downloading the 64-bit Linux Version from the official website, as sudo apt-get install libsfml-dev strangely didn't install the libraries.
Using something different, like sf::Clock works perfectly fine. I'm using the code from the SFML website, posted below:
#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;
}
Any suggestions?
EDIT: I'm not running Linux Mint in any Virtual Machine. I'm dualbooting with Windows 10. Also the segmentation fault happens to be an invalid pointer error.