alldying 发表于 2007-1-27 18:28:52

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

交叉编译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
提示如下:
# 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
请问是什么原因呢???

请各位帮忙解答,谢谢!!!

netexe 发表于 2007-2-5 20:11:36

arm-linux-gcc -o example1 example1.c-lfreetype
页: [1]
查看完整版本: [求助]请教一个freetype的问题。