I am not able to link the libraries of sfml...
$g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: cannot find -lsfml-graphics
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: cannot find -lsfml-system
collect2: ld returned 1
/usr/lib$ ls | grep sfml
libsfml-audio.so.2
libsfml-audio.so.2.0
libsfml-graphics.so.2
libsfml-graphics.so.2.0
libsfml-network.so.2
libsfml-network.so.2.0
libsfml-system.so.2
libsfml-system.so.2.0
libsfml-window.so.2
libsfml-window.so.2.0
I also tried -L/usr/lib, but nothing changed.
#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;
}