LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1040|回复: 2

[求助]请教一个freetype的问题。

[复制链接]
发表于 2007-1-27 18:25:40 | 显示全部楼层 |阅读模式
交叉编译freetype-2.1.10,步骤如下:
./configure --prefix=/usr/local/arm/2.95.3/arm-linux --host=arm-linux
CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
make
make install
编译完freetype-2.1.10后,/usr/local/arm/2.95.3/arm-linux/lib下多了
libfreetype.so.6.3.8
libfreetype.so.6
libfreetype.so
libfreetype.la
libfreetype.a
共5个文件。
/usr/local/arm/2.95.3/arm-linux/include下多了个目录freetype2,fretype2下有个目录freetype,freetype下是几个目录和些头文件,看时间应该是编译后生成的。

然后编译ft2demos-2.1.10,一个示例程序包,步骤如下:
make
提示:Please compile the library before the demo programs!
请问什么原因???

还有,如果单独编译freetype-doc-2.1.10中的一个名为example1.c的文件,步骤如下:
arm-linux-gcc -o example1 example1.c
提示如下:
[root@haha infotest]# arm-linux-gcc -o exa exa.c
/tmp/ccmdcBgl.o: In function `main':
/tmp/ccmdcBgl.o(.text+0x2e0): undefined reference to `FT_Init_FreeType'
/tmp/ccmdcBgl.o(.text+0x308): undefined reference to `FT_New_Face'
/tmp/ccmdcBgl.o(.text+0x32c): undefined reference to `FT_Set_Char_Size'
/tmp/ccmdcBgl.o(.text+0x34c): undefined reference to `cos'
/tmp/ccmdcBgl.o(.text+0x368): undefined reference to `sin'
/tmp/ccmdcBgl.o(.text+0x388): undefined reference to `sin'
/tmp/ccmdcBgl.o(.text+0x3a4): undefined reference to `cos'
/tmp/ccmdcBgl.o(.text+0x418): undefined reference to `FT_Set_Transform'
/tmp/ccmdcBgl.o(.text+0x438): undefined reference to `FT_Load_Char'
/tmp/ccmdcBgl.o(.text+0x4f0): undefined reference to `FT_Done_Face'
/tmp/ccmdcBgl.o(.text+0x4f8): undefined reference to `FT_Done_FreeType'
collect2: ld returned 1 exit status
请问是什么原因呢???

请各位帮忙解答,谢谢!!!
发表于 2007-1-28 19:51:03 | 显示全部楼层
arm-linux-gcc -o exa exa.c -lfreetype
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-29 16:22:07 | 显示全部楼层
谢谢DoDo,编译通过了,果然是这个原因。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表