2008-05-09 13:29:28     error with SDL_ttf library

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-05-09 13:29:28     error with SDL_ttf library

Miquel Soler i Mir (SPAIN)

Message: 55680   

 

Hello.

 

I had a problem when I try to compile an aplication with SDL_ttf library.

 

When I compile for a Host I don't have any problem, everything is working

 

The problem is when I try to compile for uClinux.

 

I add the main and Makefile.

 

The system answer me this:

 

make

bfin-linux-uclibc-gcc -I/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/include  -L/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib -lSDL -lSDL_ttf -lSDL_image main.o -o TFT

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: warning: libfreetype.so.6, needed by /home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so, not found (try using -rpath or -rpath-link)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: warning: libz.so.1, needed by /home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so, not found (try using -rpath or -rpath-link)

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Set_Pixel_Sizes'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Render_Glyph'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Open_Face'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Init_FreeType'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Done_Face'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Set_Char_Size'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_MulFix'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Load_Glyph'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Get_Char_Index'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Done_FreeType'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Get_Kerning'

/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib/libSDL_ttf.so: undefined reference to `_FT_Outline_Transform'

collect2: ld va retornar l'estat de sortida 1

make: *** [TFT] Error 1

miki-toshiba:/mnt/DADES/pfc/Tramontana/Programes/Codi/Prova_TTF#

 

 

I check in the rooms from kernel and the libfreetype is inside (/uClinux-dist-2008R1-RC8/romfs/usr/lib

)

 

I recompile the kernel another time but the problem don't solve.

 

Can somebody help me?

 

Thanks

 

Miquel Soler i Mir

 

 

 

Makefile

main.c

TranslateQuoteReplyEditDelete

 

 

2008-05-09 13:35:17     Re: error with SDL_ttf library

Mike Frysinger (UNITED STATES)

Message: 55681   

 

the libraries in question should exist in the staging library directory ... did you delete them ?  otherwise, the SDL lib couldnt have been linked in the first place if they didnt exist in the staging library directory.

QuoteReplyEditDelete

 

 

2008-05-09 13:45:48     Re: error with SDL_ttf library

Miquel Soler i Mir (SPAIN)

Message: 55683   

 

The library exist (I don't delete)

 

miki-toshiba:/home/mikimonster/uClinux-dist-2008R1-RC8/staging/usr/lib# ls -l libfree*

-rw-r--r-- 1 root root     2544278 2008-05-09 19:15 libfreetype.a

-rw-r--r-- 1 root root              869 2008-05-09 19:16 libfreetype.la

lrwxrwxrwx 1 root root             21 2008-05-09 19:15 libfreetype.so -> libfreetype.so.6.3.16

lrwxrwxrwx 1 root root             21 2008-05-09 19:15 libfreetype.so.6 -> libfreetype.so.6.3.16

-rwxr-xr-x 1 root root 1   667722 2008-05-09 19:15 libfreetype.so.6.3.16

 

Thanks

 

Miquel Soler i Mir

 

 

 

 

 

 

TranslateQuoteReplyEditDelete

 

 

2008-05-09 13:56:03     Re: error with SDL_ttf library

Mike Frysinger (UNITED STATES)

Message: 55684   

 

i would have thought the -L to be sufficient, but guess not ... do what the error message said: use -rpath-link

QuoteReplyEditDelete

 

 

2008-05-09 14:33:53     Re: error with SDL_ttf library

Miquel Soler i Mir (SPAIN)

Message: 55689   

 

Thanks Mike.

 

But I need a like bit more help. I'm learning.

 

Can you help me with the "-rpath-link".

 

Thanks Mike

TranslateQuoteReplyEditDelete

 

 

2008-05-09 14:47:21     Re: error with SDL_ttf library

Mike Frysinger (UNITED STATES)

Message: 55690   

 

if you dont know how to use a linker flag, then you should consult the linker documentation

 

`man ld` has quite a bit to say on the topic of -rpath-link

QuoteReplyEditDelete

 

 

2008-05-12 21:59:42     Re: error with SDL_ttf library

Wei Jiang (CHINA)

Message: 55755   

 

Dear Miquel Soler i Mir,

 

    I successed to use SD_ttf lib. Your problem seems to be that you missed the freetype Libranry just because of the SDL_ttf depends on freetype.

Attachments

Outcomes