SFML community forums

Help => General => Topic started by: darkonaito_ on August 06, 2022, 10:58:48 pm

Title: undefined reference to `_setjmp' when building library with MinGW
Post by: darkonaito_ on August 06, 2022, 10:58:48 pm
I'm on Windows, using the 64bit MinGW latest version found on winlibs, and I exactly followed the tutorial for building the library with CMAKE you find on the official website, using SFML 2.6, and after running "mingw32-make" to build I got a bunch of green "Building CXX object..." and finally two "undefined reference to `_setjmp'":

Quote
h:/winlibs_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/jayok/Downloads/SFML-2.6.x/SFML-2.6.x/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
h:/winlibs_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/jayok/Downloads/SFML-2.6.x/SFML-2.6.x/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
Title: Re: undefined reference to `_setjmp' when building library with MinGW
Post by: eXpl0it3r on August 08, 2022, 05:09:33 pm
As you probably have already found out on the other thread (https://en.sfml-dev.org/forums/index.php?topic=28265.0), you need to download the MSVCRT version of WinLibs.