參考資訊:
https://www.sfml-dev.org/index.php
main.cpp
#include <unistd.h> #include <iostream> #include <SFML/Graphics.hpp> int main(int argc, char **argv) { sf::RenderWindow window(sf::VideoMode(320, 240), "hello, world!"); window.clear(); window.display(); usleep(3000000); window.close(); return 0; }
編譯、執行
$ g++ main.cpp -o main -lsfml-graphics -lsfml-window -lsfml-system $ ./main