Chinaunix首页 | 论坛 | 博客
  • 博客访问: 461267
  • 博文数量: 107
  • 博客积分: 6073
  • 博客等级: 准将
  • 技术积分: 790
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-14 15:34
文章分类

全部博文(107)

文章存档

2010年(1)

2009年(106)

分类:

2009-08-18 15:30:18

libttf库的安装
下载地址:
# tar zxf freetype-1.3.1.tar.gz
# cd freetype-1.3.1

#make
#make install

我在编译的时候出现下面的提示出错:

ftdump.c:172:1: 错误:毗连“.”和“glyph_object”不能给出一个有效的预处理标识符
ftdump.c:182:1: 错误:毗连“.”和“first_instance”不能给出一个有效的预处理标识符
ftdump.c:191:1: 错误:毗连“.”和“second_instance”不能给出一个有效的预处理标识符
ftdump.c:201:1: 错误:毗连“.”和“face_object”不能给出一个有效的预处理标识符
ftdump.c:202:1: 错误:毗连“.”和“glyph_object”不能给出一个有效的预处理标识符
ftdump.c:203:1: 错误:毗连“.”和“second_instance”不能给出一个有效的预处理标识符
ftdump.c:863:1: 错误:毗连“.”和“initial_overhead”不能给出一个有效的预处理标识符
ftdump.c:882:1: 错误:毗连“.”和“face_object”不能给出一个有效的预处理标识符
make[1]: *** [ftdump.o] 错误 1
make[1]: Leaving directory `/home/Ada/Desktop/linux/minigui/tools/freetype-1.3.1/test'
make: *** [tttest] 错误 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 )

这样该问题就能解决了

但是如果马上编译和运行示例程序,我遇到下面的错误:

wang@ubuntu:/work/minigui/samples-1.6.10/mgpoint-1.0$ ./mgpoint
./mgpoint: error while loading shared libraries: libttf.so.2: cannot open shared object file: No such file or directory

这个时候需要执行

#ldconfig

因为刚才install 的时候更新了库,我们必须手动刷新一遍。当然,重启也是可以的。。。

 

阅读(2460) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-12-09 14:24:25

按照仁兄的步骤 果然可解决 -lttf的问题 Thanks