Cannot compile SDL_ttf under Cygwin

Hello everyone!

Okay, I did a google search. To prove so… :slight_smile:
http://twomix.devolution.com/pipermail/sdl/2003-July/055083.html
http://www.wesnoth.org/forum/viewtopic.php?p=196813&sid=bcf0872127cb71f20774d8a2c903a548

I’m having the same problem as the first link. The linker cannot find
"_setjmp". He got no replies… The second link suggests to compile
everything yourself, which I did.

Maybe I should use an older version of FreeType or something?

Thanks in advance!

P.S, here’s my linker output:

Leo at Rita /cygdrive/c/ttf/sdl_ttf-2.0.9
$ make
if /bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=""
-DPACKAGE_T
ARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING=""
-DPACKAGE_BUGREPORT="
" -DPACKAGE=“SDL_ttf” -DVERSION=“2.0.9” -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=
1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHA
VE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DL
FCN_H=1 -I. -I. -g -O2 -I/usr/local/include/freetype2
-I/usr/local/include
-I/usr/local/include/SDL -I/usr/include/mingw -mno-cygwin
-Dmain=SDL_main -DHAVE
_OPENGL -MT SDL_ttf.lo -MD -MP -MF “.deps/SDL_ttf.Tpo” -c -o SDL_ttf.lo
SDL_ttf.
c;
then mv -f “.deps/SDL_ttf.Tpo” “.deps/SDL_ttf.Plo”; else rm -f
".deps/SD
L_ttf.Tpo"; exit 1; fi
mkdir .libs
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION=""
-DPACKAGE
_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE=“SDL_ttf”
-DVERSION=“2.0.9”
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHA
VE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_ST
DINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -g -O2
-I/usr/local/include/
freetype2 -I/usr/local/include -I/usr/local/include/SDL
-I/usr/include/mingw -mn
o-cygwin -Dmain=SDL_main -DHAVE_OPENGL -MT SDL_ttf.lo -MD -MP -MF
.deps/SDL_ttf.
Tpo -c SDL_ttf.c -DPIC -o .libs/SDL_ttf.o
gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION=""
-DPACKAGE
_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE=“SDL_ttf”
-DVERSION=“2.0.9”
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHA
VE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_ST
DINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -g -O2
-I/usr/local/include/
freetype2 -I/usr/local/include -I/usr/local/include/SDL
-I/usr/include/mingw -mn
o-cygwin -Dmain=SDL_main -DHAVE_OPENGL -MT SDL_ttf.lo -MD -MP -MF
.deps/SDL_ttf.
Tpo -c SDL_ttf.c -o SDL_ttf.o >/dev/null 2>&1
windres version.rc version.o
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2
-I/usr/local/include/freetype
2 -I/usr/local/include -I/usr/local/include/SDL -I/usr/include/mingw
-mno-cygwin
-Dmain=SDL_main -DHAVE_OPENGL -o libSDL_ttf.la -rpath /usr/local/lib
-no-unde
fined -release 2.0 -version-info 6:3:6 -Wl,version.o SDL_ttf.lo
-L/usr/local/li
b -L/usr/local/lib -lfreetype -lz -L/usr/local/lib -lmingw32 -lSDLmain
-lSDL -mn
o-cygwin -mwindows
gcc -shared .libs/SDL_ttf.o -L/usr/local/lib
/usr/local/lib/libfreetype.a -lz
-lmingw32 -lSDLmain /usr/local/lib/libSDL.dll.a -mno-cygwin
-Wl,version.o -mno-
cygwin -mwindows -o .libs/SDL_ttf.dll -Wl,–enable-auto-image-base
-Xlinker --ou
t-implib -Xlinker .libs/libSDL_ttf.dll.a
/usr/local/lib/libfreetype.a(sfnt.o): In function tt_face_build_cmaps': /cygdrive/c/ft/freetype-2.3.5/src/sfnt/ttcmap.c:2309: undefined reference to_s
etjmp’
/usr/local/lib/libfreetype.a(smooth.o): In function
gray_convert_glyph_inner': /cygdrive/c/ft/freetype-2.3.5/src/smooth/ftgrays.c:1619: undefined reference to_setjmp’
Creating library file: .libs/libSDL_ttf.dll.a
collect2: ld returned 1 exit status
make: *** [libSDL_ttf.la] Error 1

Okay, I did a google search. To prove so… :slight_smile:
http://twomix.devolution.com/pipermail/sdl/2003-July/055083.html
http://www.wesnoth.org/forum/viewtopic.php?p=196813&sid=bcf0872127cb71f20774d8a2c903a548

I’m having the same problem as the first link. The linker cannot find
"_setjmp". He got no replies… The second link suggests to compile
everything yourself, which I did.

You need to compile freetype with -mno-cygwin
I just use a Linux cross-compiler, which uses mingw32 and doesn’t have any
of the cygwin compatibility layer.

See ya,
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment