交叉编译freetype2
FreeType 2被设计为一种占用空间小的、高效的、高度可定制的、并且可以产生可移植的高品质输出(符号图像)。可以被用在诸如图像库、展出服务器、字体转换工具、图像文字产生工具等多种其它产品上。(百度百科)编译器:arm-none-linux-gnueabi-g++使用系统默认编译器gcc直接编译$ ./configure --prefix=$PWD/_INSTALL --without-zli
Linux linux
FreeType 2被设计为一种占用空间小的、高效的、高度可定制的、并且可以产生可移植的高品质输出(符号图像)。
可以被用在诸如图像库、展出服务器、字体转换工具、图像文字产生工具等多种其它产品上。(百度百科)
编译器:arm-none-linux-gnueabi-g++
使用系统默认编译器gcc直接编译
$ ./configure --prefix=$PWD/_INSTALL --without-zlib
$ make & make install
直接在当前目录的_INSTALL/生成对应的libfreetype.a以及libfreetype.so;
使用arm-none-linux-gnueabi-g++交叉编译:
$ ./configure CC=arm-none-linux-gnueabi-g++ --host=arm-linux --prefix=$PWD/_INSTALL --without-zlib
$ make & make install
其中–without-zlib表示不使用第三库zlib,使用freetype内部的相关函数;
configure结束后出现日志:
configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating freetype-config
config.status: creating freetype2.pc
config.status: creating ftconfig.h
config.status: executing libtool commands
make: Nothing to be done for `unix'.
可以看出脚本为我们创建了其他的脚本文件,如下:
builds/unix/config.status
builds/unix/unix-cc.mk
builds/unix/unix-def.mk
builds/unix/freetype-config
builds/unix/freetype2.pc
builds/unix/ftconfig.h
可以查看配置后的这些文件:
unix-cc.mk
......
CC := arm-none-linux-gnueabi-g++
......
unix-def.mk
......
prefix := /home/admin/project/demo/freetype-2.4.10/freetype-2.4.10/_INSTALL
exec_prefix := ${prefix}
libdir := ${exec_prefix}/lib
bindir := ${exec_prefix}/bin
includedir := ${prefix}/include
datarootdir := ${prefix}/share
......
config.status
......
host='arm-unknown-linux-gnu'
......
所以如果没有重新configure修改配置的前提下,
之后的每一次代码修改都可以直接使用make&make install来完成编译工作;
开源库下载地址:
https://www.freetype.org/download.html
https://sourceforge.net/projects/freetype/files/
https://sourceforge.net/projects/freetype/files/freetype2/
这里最新的为2.7.1版本,可以直接下载编译;
或者网速较慢直接使用:
http://download.csdn.net/detail/dreamintheworld/9755333
freetype2库的使用详解
http://blog.csdn.net/dreamintheworld/article/details/57413335
更多推荐
所有评论(0)