forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL_ttf Compiling error

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Mon Mar 31, 2008 12:58 am    Post subject: SDL_ttf Compiling error Reply with quote

I'm trying to compile a simple SDL_ttf_test program. but when i compile it i got an error.

Code:
 undefined reference to `ceil'


the whole compiling output:
Code:

psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o -L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower -lbulletml -lGLU -lm -lpspvram -lSDL_mixer -lstdc++ -lz -lbz2 -lglut -lmad -lSdkUtilities -lSDL_ttf -lsupc++ -lc -liberty -lmikmod -lSDL -lsmpeg -lvorbis -lfreetype -ljpeg -logg -lSDL_gfx -lsqlite3 -lvorbisenc -lg -llua -lpng -lSDL_image -lssp -lvorbisfile -lGL -llualib -lpspvalloc -lSDLmain -lssp_nonshared -lvorbisidec -lpspatrac3 -lpspge -lpspnet -lpspsdk -lpspaudio -lpspge_driver -lpspnet_adhoc -lpspsircs -lpspaudiocodec -lpspgu -lpspnet_adhocctl -lpspumd -lpspaudio_driver -lpspgum -lpspnet_adhocmatching -lpspumd_driver -lpspaudiolib -lpspgum_vfpu -lpspnet_apctl -lpspusb -lpspchnnlsv -lpsphprm -lpspnet_inet -lpspusbbus_driver -lpspctrl -lpsphprm_driver -lpspnet_resolver -lpspusbcam -lpspctrl_driver -lpsphttp -lpspopenpsid -lpspusb_driver -lpspdebug -lpspirkeyb -lpsppaf -lpspusbstor -lpspdebugkb -lpspjpeg -lpsppower -lpspuser -lpspdisplay -lpspkernel -lpsppower_driver -lpsputility -lpspdisplay_driver -lpsplibc -lpspprof -lpspvfpu -lpspfpu -lpspmpeg -lpspreg -lpspvideocodec -lpspgdb -lpspmpegbase -lpspreg_driver -lpspvshbridge -lpspgdb_kernel -lpspmpegbase_driver -lpsprtc -lpspwlan -lpspgdb_user -lpspnand_driver -lpsprtc_driver  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o SDLttf.elf
/usr/local/pspdev/psp/lib/libSDL_ttf.a(SDL_ttf.o): In function `Find_Glyph':
/home/joris/pspsdk/trunk/psplibraries/build/SDL_ttf/SDL_ttf.c:475: undefined reference to `ceil'
/home/joris/pspsdk/trunk/psplibraries/build/SDL_ttf/SDL_ttf.c:535: undefined reference to `ceil'
collect2: ld gaf exit-status 1 terug
make: *** [SDLttf.elf] Fout 1


As you can see i included all the libraries i found but i still got the error.

How can i solve this?
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Mon Mar 31, 2008 1:59 am    Post subject: Reply with quote

You need to add -lm to your LIBS line after -lSDL_ttf, not before. Order is important.
Back to top
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Mon Mar 31, 2008 2:01 am    Post subject: Reply with quote

ok
tanks
It works :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group