From 1220bfdf50ff2938d9b4191f123a6b8cea399790 Mon Sep 17 00:00:00 2001 From: Simon Krabel Date: Sun, 9 Nov 2025 15:48:20 -0500 Subject: [PATCH 1/4] Document static SFML library linking and dependencies Added information about linking static SFML libraries and their dependencies. --- pages/tutorials/3.0/getting-started/linux.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pages/tutorials/3.0/getting-started/linux.md b/pages/tutorials/3.0/getting-started/linux.md index c259ea256..d26768d59 100644 --- a/pages/tutorials/3.0/getting-started/linux.md +++ b/pages/tutorials/3.0/getting-started/linux.md @@ -99,6 +99,21 @@ If you installed SFML to a non-standard path, you'll need to tell the linker whe ``` g++ main.o -o sfml-app -L/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 dependancies of each sfml module. + +| Module | Dependencies | +|-----------------|--------------| +| sfml-graphics-s |
  1. sfml-window-s
  2. freetype
  3. sfml-system-s
| +| sfml-window-s |
  1. sfml-system-s
  2. Xi
  3. X11
  4. Xrandr
  5. Xcursor
  6. udev
| +| sfml-system-s || +| sfml-network-s |
  1. sfml-system-s
| +| sfml-audio-s |
  1. sfml-system-s
  2. FLAC
  3. vorbisenc
  4. vorbisfile
  5. vorbis
  6. ogg
| + +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: From 6c6f09a5d893576410fc51c7181a5b5f4bf8e632 Mon Sep 17 00:00:00 2001 From: Simon Krabel Date: Sun, 9 Nov 2025 16:59:11 -0500 Subject: [PATCH 2/4] Update SFML linking instructions for Linux Added note about the beginner-hostile workflow and the need to define SFML_STATIC macro. --- pages/tutorials/3.0/getting-started/linux.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/tutorials/3.0/getting-started/linux.md b/pages/tutorials/3.0/getting-started/linux.md index d26768d59..c5537f6e5 100644 --- a/pages/tutorials/3.0/getting-started/linux.md +++ b/pages/tutorials/3.0/getting-started/linux.md @@ -102,6 +102,11 @@ g++ main.o -o sfml-app -L/lib -lsfml-graphics -lsfml-window - 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 dependancies of each sfml module. +!!! note + + This is a very beginner-hostile workflow and not the recommended way to start learning SFML. + + | Module | Dependencies | |-----------------|--------------| | sfml-graphics-s |
  1. sfml-window-s
  2. freetype
  3. sfml-system-s
| @@ -110,9 +115,9 @@ You will also need to link the dependancies of each sfml module. | sfml-network-s |
  1. sfml-system-s
| | sfml-audio-s |
  1. sfml-system-s
  2. FLAC
  3. vorbisenc
  4. vorbisfile
  5. vorbis
  6. ogg
| -Example with sfml-window and sfml-system. +Example with sfml-window and sfml-system. You will also need to define SFML_STATIC as a macro either in the script or in the compiler flags. ``` -g++ main.o -o sfml-app -lsfml-window-s -lsfml-system-s -lXi -lX11 -lXrandr -lXcursor -ludev +g++ main.o -o sfml-app -lsfml-window-s -lsfml-system-s -lXi -lX11 -lXrandr -lXcursor -ludev -DSFML_STATIC ``` We are now ready to execute the compiled program: From 308b15fda779c9a74247b27a7991913d1e434c10 Mon Sep 17 00:00:00 2001 From: Simon Krabel Date: Sun, 21 Dec 2025 11:51:38 -0500 Subject: [PATCH 3/4] Update SFML linking instructions in Linux tutorial Removed note about beginner-hostile workflow and clarified example. --- pages/tutorials/3.0/getting-started/linux.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/tutorials/3.0/getting-started/linux.md b/pages/tutorials/3.0/getting-started/linux.md index c5537f6e5..d396c0fab 100644 --- a/pages/tutorials/3.0/getting-started/linux.md +++ b/pages/tutorials/3.0/getting-started/linux.md @@ -102,10 +102,6 @@ g++ main.o -o sfml-app -L/lib -lsfml-graphics -lsfml-window - 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 dependancies of each sfml module. -!!! note - - This is a very beginner-hostile workflow and not the recommended way to start learning SFML. - | Module | Dependencies | |-----------------|--------------| @@ -115,9 +111,9 @@ You will also need to link the dependancies of each sfml module. | sfml-network-s |
  1. sfml-system-s
| | sfml-audio-s |
  1. sfml-system-s
  2. FLAC
  3. vorbisenc
  4. vorbisfile
  5. vorbis
  6. ogg
| -Example with sfml-window and sfml-system. You will also need to define SFML_STATIC as a macro either in the script or in the compiler flags. +Example with sfml-window and sfml-system. ``` -g++ main.o -o sfml-app -lsfml-window-s -lsfml-system-s -lXi -lX11 -lXrandr -lXcursor -ludev -DSFML_STATIC +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: From 7c6ac50b14cbccadb4f4ae623b6a6129df55f9bd Mon Sep 17 00:00:00 2001 From: Simon Krabel Date: Tue, 17 Feb 2026 17:26:00 -0500 Subject: [PATCH 4/4] Apply suggestion from @JonnyPtn Co-authored-by: Jonny --- pages/tutorials/3.0/getting-started/linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/tutorials/3.0/getting-started/linux.md b/pages/tutorials/3.0/getting-started/linux.md index d396c0fab..dccd8bd78 100644 --- a/pages/tutorials/3.0/getting-started/linux.md +++ b/pages/tutorials/3.0/getting-started/linux.md @@ -100,7 +100,7 @@ If you installed SFML to a non-standard path, you'll need to tell the linker whe g++ main.o -o sfml-app -L/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 dependancies of each sfml module. +You will also need to link the dependencies of each sfml module. | Module | Dependencies |