0 Members and 1 Guest are viewing this topic.
is there another way to install sfml? (without cmake)
#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;}
g++ -Wall -o "omg" "omg.cpp" -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system (in directory: /home/ares/Desktop)omg.cpp: In function ‘int main()’:omg.cpp:6:5: error: ‘CircleShape’ is not a member of ‘sf’omg.cpp:6:21: error: expected ‘;’ before ‘shape’omg.cpp:7:5: error: ‘shape’ was not declared in this scopeomg.cpp:9:19: error: ‘class sf::RenderWindow’ has no member named ‘isOpen’omg.cpp:12:23: error: ‘class sf::RenderWindow’ has no member named ‘pollEvent’omg.cpp:14:23: error: ‘class sf::Event’ has no member named ‘type’omg.cpp:15:24: error: ‘class sf::RenderWindow’ has no member named ‘close’omg.cpp:18:16: error: ‘class sf::RenderWindow’ has no member named ‘clear’omg.cpp:19:16: error: ‘class sf::RenderWindow’ has no member named ‘draw’omg.cpp:20:16: error: ‘class sf::RenderWindow’ has no member named ‘display’Compilation failed.