I am trying to learn SFML and tried the first code it shows on the website:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(1366, 768), "Hello World!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Blue);
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;
}
}
After compiling it with g++ -o Hello_World Hello_World.cpp I get:
*** Error in `./Hello_World': free(): invalid pointer: 0x0000000000dfadc8 ***
Aborted (core dumped)
Please help me.