下载freetype1.3.1源码,解压,编译:
# tar -zxf freetype-1.3.1.tar.gz
# cd freetype-1.3.1
# ./configure
# make
# make install
出现如下错误
make[1]: Entering directory `/home/freetype-1.3.1/test'
gcc -c -I. -I/home/freetype-1.3.1/test/arch/unix/../.. -I.. -I/home/freetype-1.3.1/test/arch/unix/../../../lib -I/home/freetype-1.3.1/test/arch//../../../lib/extend -g -O2 -Wall -pedantic -ansi -DX11 -DLOCALEDIR='"/usr/share/locale"' ftdump.c
ftdump.c:172:1: error: pasting "." and "glyph_object" does not give a valid preprocessing token
ftdump.c:182:1: error: pasting "." and "first_instance" does not give a valid preprocessing token
ftdump.c:191:1: error: pasting "." and "second_instance" does not give a valid preprocessing token
ftdump.c:201:1: error: pasting "." and "face_object" does not give a valid preprocessing token
ftdump.c:202:1: error: pasting "." and "glyph_object" does not give a valid preprocessing token
ftdump.c:203:1: error: pasting "." and "second_instance" does not give a valid preprocessing token
ftdump.c:863:1: error: pasting "." and "initial_overhead" does not give a valid preprocessing token
ftdump.c:882:1: error: pasting "." and "face_object" does not give a valid preprocessing token
make[1]: *** [ftdump.o] Error 1
make[1]: Leaving directory `/home/freetype-1.3.1/test'
make: *** [tttest] Error 2
解决办法:
修改ftdump.c里面的代码:
将 Print_Mem( memory_footprint.##field, string )
改为: Print_Mem( memory_footprint.field, string )
将 #define FOOTPRINT( field ) Save_Memory( &memory_footprint.##field )
改为: #define FOOTPRINT( field ) Save_Memory( &memory_footprint.field )
再make,没有问题,OK
阅读(2720) | 评论(0) | 转发(0) |