If you're using some Debian derived system, simply:
sudo apt install libsfml-dev
To download the main package, with this you have access to all 5 modules that compose SFML: system, window, graphics, network and audio.
If you don't have a look at here.
You can either use CMAKE or type a thousand flags in the command line.
First, make sure you have all of these dependencies:
- freetype
- x11
- xrandr
- udev
- opengl
- flac
- ogg
- vorbis
- vorbisenc
- vorbisfile
- openal
- pthread
If you're in a Debian derived system you just have to have cmake
.
sudo apt install cmake
Next do the following in your source directory:
mkdir build
cd build
cmake ..
make
Run it with ./sfml-app
.
Compile it:
g++ -c <all_of_implementation_files.cpp>
Link it:
g++ <all_your_compiled_files.o> -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-main
Execute it:
./sfml-app