但是出现如下错误:
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x67): In function `TTF_Init':
: undefined reference to `FT_Init_FreeType'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x20b): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Open_Face'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x23c): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Set_Char_Size'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x274): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x293): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2c1): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2e1): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x301): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x33c): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Set_Pixel_Sizes'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x53e): In function `Load_Glyph':
: undefined reference to `FT_Get_Char_Index'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x55c): In function `Load_Glyph':
: undefined reference to `FT_Load_Glyph'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x7ab): In function `Load_Glyph':
: undefined reference to `FT_Outline_Transform'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x7c7): In function `Load_Glyph':
: undefined reference to `FT_Render_Glyph'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0xb3d): In function `TTF_CloseFont':
: undefined reference to `FT_Done_Face'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2019): In function `TTF_Quit':
: undefined reference to `FT_Done_FreeType'
collect2: ld returned 1 exit status
[root@dove home]# gcc ball.c -o ball `sdl-config --libs --cflags` -L/usr/X11R6/lib -lX11 -lXext -lGL -ldl -lm -static -lSDL_image -lSDL_ttf
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x67): In function `TTF_Init':
: undefined reference to `FT_Init_FreeType'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x20b): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Open_Face'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x23c): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Set_Char_Size'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x274): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x293): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2c1): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2e1): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x301): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_MulFix'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x33c): In function `TTF_OpenFontIndexRW':
: undefined reference to `FT_Set_Pixel_Sizes'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x53e): In function `Load_Glyph':
: undefined reference to `FT_Get_Char_Index'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x55c): In function `Load_Glyph':
: undefined reference to `FT_Load_Glyph'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x7ab): In function `Load_Glyph':
: undefined reference to `FT_Outline_Transform'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x7c7): In function `Load_Glyph':
: undefined reference to `FT_Render_Glyph'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0xb3d): In function `TTF_CloseFont':
: undefined reference to `FT_Done_Face'
/usr/lib/libSDL_ttf.a(SDL_ttf.o)(.text+0x2019): In function `TTF_Quit':
: undefined reference to `FT_Done_FreeType'
collect2: ld returned 1 exit status
/usr/lib/libfreetype.a(ftgzip.o)(.text+0x242): In function `ft_gzip_file_init':
: undefined reference to `inflateInit2_'
/usr/lib/libfreetype.a(ftgzip.o)(.text+0x286): In function `ft_gzip_file_done':
: undefined reference to `inflateEnd'
/usr/lib/libfreetype.a(ftgzip.o)(.text+0x31f): In function `ft_gzip_file_reset':
: undefined reference to `inflateReset'
/usr/lib/libfreetype.a(ftgzip.o)(.text+0x44f): In function `ft_gzip_file_fill_output':
: undefined reference to `inflate'
collect2: ld returned 1 exit status