Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: undefined reference to `_setjmp' when building library with MinGW  (Read 97 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 2
    • View Profile
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'":

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
« Last Edit: August 07, 2022, 12:22:24 am by darkonaito_ »


  • SFML Team
  • Hero Member
  • *****
  • Posts: 10234
    • View Profile
    • development blog
    • Email
Re: undefined reference to `_setjmp' when building library with MinGW
« Reply #1 on: August 08, 2022, 05:09:33 pm »
As you probably have already found out on the other thread, you need to download the MSVCRT version of WinLibs.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/