Sdl_Ttf Issues


spdality

Still Fresh
Joined
Nov 13, 2009
Messages
2
Hey

I'm having an issue linking my GP2X app after adding true type font support with SDL_ttf. I won't bore you with details as I don't think I need to. I get the following output after compiling and trying to link my app:

Linking AGS.gpe...
1>..\..\devkitPro\devkitGP2X\lib\libSDL_ttf.a(SDL_ttf.o): In function `Find_Glyph':
1>/home/Administrator/newtoolchain/SDL_ttf-2.0.7/SDL_ttf.c:535: undefined reference to `ceilf'
1>/home/Administrator/newtoolchain/SDL_ttf-2.0.7/SDL_ttf.c:475: undefined reference to `ceilf'

I'm guessing I'm just missing a library that I need to link against, or one is out of date..

I currently link against:
SDL
SDL_image
SDL_mixer
pthread
png
jpeg
m
dl
stdc++
z
SDL_ttf
freetype

Where does / should ceilf reside??

Thanks in advance

Ste
 
A quick google search tells me it is in the math library so you'd want to try moving your -lm after the -lSDL_ttf, or if that doesn't work try moving it before the -lSDL_ttf in your linker parameters.

You might want to download other's GP2X source releases and look at their Makefiles for more examples of linking parameters to experiment with. It can be a pain. Also be sure to pass the -msoft_float parameter so software float routines are used. I pass it to both the compiler and linker myself.
 
For future reference, when linking with gcc it expects the libraries to be in order of most dependant to least dependant. In this case, SDL_Ttf is dependant on m so it has to go first :).
 
Back
Top