[EDIT]
I could pinpoint the issue:
https://winlibs.com/ offers two versions of the mingw-w64 compiler: One ships with UCRT runtime, the other with MSVCRT runtime. With MSVCRT runtime i had no compilation issues. Visual Studio Compiler also had no issues compiling SFML on Windows 11. So i guess its something with the UCRT runtime.
[/EDIT]
I tried to compile SFML on Windows 11 and it fails with the following error-message:
[ 79%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImpl.cpp.obj
[ 79%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplFBO.cpp.obj
[ 80%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplDefault.cpp.obj
[ 81%] Building RC object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/sfml-graphics.rc.obj
[ 82%] Linking CXX shared library ..\..\..\lib\sfml-graphics-2.dll
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/Keen/Downloads/SFML-master/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/Keen/Downloads/SFML-master/extlibs/libs-mingw/x64/libfreetype.a(smooth.c.obj):smooth.c:(.text+0x77a): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [src\SFML\Graphics\CMakeFiles\sfml-graphics.dir\build.make:602: lib/sfml-graphics-2.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:307: src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
mingw32-make: *** [makefile:155: all] Error 2
I did not have this issue on Windows 10 using the same procedure described below:
- 1. I use mingw-w64 compiler from https://winlibs.com/ (GCC 11.2.0 + LLVM/Clang/LLD/LLDB 13.0.0 + MinGW-w64 9.0.0 - UCRT-Runtime)
- 2. Download SFML from https://github.com/SFML/SFML
- 3. generate CMake-Files for MinGW.
- 4. in Build-Folder: "mingw32-make install"
It compiles until 82 % and than cannot find '_setjmp'.
Compilation of SFML always worked for me in the past, this is the first time that it cannot get through to 100 %. Maybe it has something to do with Win 11?