矢量字体的操作过程

第一步:解压 freetype-2.4.10.tar.bz2

linux@ubuntu:~$ cd tool
linux@ubuntu:~/tool$ mkdir freetype
linux@ubuntu:~/tool$ cd freetype
#在此目录下添加矢量字体工具包  freetype-2.4.10.tar.bz2
linux@ubuntu:~/tool/freetype$ tar -xjf freetype-2.4.10.tar.bz2

第二步:

PC端:用于ubuntu内部使用:gcc -o example example.c
①配置(PC端)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ ./configure

②编译(PC端)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ make

③安装(PC端)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ sudo make install

开发板使用:便与arm-linux-gcc交叉编译使用:arm-linux-gcc -o example example.c,所以将安装到交叉编译器的目录下
①配置(交叉编译器)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ ./configure --host=arm-linux

②编译(交叉编译器)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ make

③安装在一个目录下面便于copy(交叉编译器)

linux@ubuntu:~/tool/freetype/freetype-2.4.10$ mkdir tmp
linux@ubuntu:~/tool/freetype/freetype-2.4.10$ make DESTDIR=$PWD/tmp install

④编译出来的头文件应该放入:

# 放到和 stdio.h 一样的目录下(在交叉编译器目录下使用 “find -name stdio.h” 查找)
/usr/local/arm/gcc-3.4.5-glibc-2.3.6/arm-linux/include
linux@ubuntu:~/tool/freetype/freetype-2.4.10$ cd tmp/usr/local/include/
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include$ ls
freetype2  ft2build.h
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include$ cd freetype2/
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include/freetype2$ ls
freetype
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include/freetype2$ mv freetype ./..
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include$ rm -rf freetype2
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include$ ls
freetype  ft2build.h

~/tool/freetype/freetype-2.4.10/tmp/usr/local/include目录下的内容放到/usr/local/arm/gcc-3.4.5-glibc-2.3.6/arm-linux/include

#放到就交叉编译目录下的include
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/include$ sudo cp * /usr/local/arm/gcc-3.4.5-glibc-2.3.6/arm-linux/include -rf
#放到文件系统目录下include

⑤编译出来的库文件应该放入

/usr/local/arm/gcc-3.4.5-glibc-2.3.6/arm-linux/lib
#放到就交叉编译目录下lib
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/lib$ sudo cp * /usr/local/arm/gcc-3.4.5-glibc-2.3.6/arm-linux/lib -d -rf

#放到文件系统目录下lib(-d :包括链接文件)
linux@ubuntu:~/tool/freetype/freetype-2.4.10/tmp/usr/local/lib$ cp *so* /home/linux/nfs/fs_mini/lib -d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值