I am using this:
https://github.com/SFML/cmake-sfml-project template to make my SFML project. It works fine until i try anything related to fonts and text.
When I just add the following line to my project:
sf::Font defaultFont;
I get this output:
[main] Building folder: SFMLGame all
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/<myname>/Documents/GitHub/SFMLGame/build --config Debug --target all -j 14 --
[build] [ 2%] Built target sfml-main
[build] [ 17%] Built target sfml-system
[build] [ 38%] Built target sfml-network
[build] [ 47%] Built target sfml-audio
[build] [ 71%] Built target sfml-window
[build] [ 98%] Built target sfml-graphics
[build] [ 99%] Linking CXX executable bin\main.exe
[build] Copy OpenAL DLL
[build] C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: _deps/sfml-src/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
[build] C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: _deps/sfml-src/extlibs/libs-mingw/x64/libfreetype.a(smooth.c.obj):smooth.c:(.text+0x77a): undefined reference to `_setjmp'
[build] collect2.exe: error: ld returned 1 exit status
[build] mingw32-make[2]: *** [CMakeFiles\main.dir\build.make:122: bin/main.exe] Error 1
[build] mingw32-make[1]: *** [CMakeFiles\Makefile2:221: CMakeFiles/main.dir/all] Error 2
[build] mingw32-make: *** [Makefile:155: all] Error 2
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/<myname>/Documents/GitHub/SFMLGame/build --config Debug --target all -j 14 -- exited with code: 2
[driver] Build completed: 00:00:00.716
[build] Build finished with exit code 2
I am on windows 10 and using mingw in VSCode. I have tried to solve it, but have not found a solution that works.