Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pages/tutorials/3.0/getting-started/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ If you installed SFML to a non-standard path, you'll need to tell the linker whe
```
g++ main.o -o sfml-app -L<sfml-install-path>/lib -lsfml-graphics -lsfml-window -lsfml-system
```
If you want to have SFML directly integrated into your executable, you must link to the static version. Static SFML libraries have the "-s" suffix, for example: "sfml-xxxx-s".
You will also need to link the dependencies of each sfml module.


| Module | Dependencies |
|-----------------|--------------|
| sfml-graphics-s |<ol><li>sfml-window-s<li>freetype<li>sfml-system-s</li></ol>|
| sfml-window-s |<ol><li>sfml-system-s<li>Xi<li>X11<li>Xrandr<li>Xcursor<li>udev</li></ol>|
| sfml-system-s ||
| sfml-network-s |<ol><li>sfml-system-s</li></ol>|
| sfml-audio-s |<ol><li>sfml-system-s<li>FLAC<li>vorbisenc<li>vorbisfile<li>vorbis<li>ogg</li></ol>|

Example with sfml-window and sfml-system.
```
g++ main.o -o sfml-app -lsfml-window-s -lsfml-system-s -lXi -lX11 -lXrandr -lXcursor -ludev
```

We are now ready to execute the compiled program:

Expand Down