FreeType 2被設計為一種占用空間小的、高效的、高度可定制的、并且可以產生可移植的高品質輸出(符號圖像)??梢员挥迷谥T如圖像庫、展出服務器、字體轉換工具、圖像文字產生工具等多種其它產品上。(百度百科)
編譯器: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.statusconfig.status: creating unix-cc.mkconfig.status: creating unix-def.mkconfig.status: creating freetype-configconfig.status: creating freetype2.pcconfig.status: creating ftconfig.hconfig.status: executing libtool commandsmake: Nothing to be done for `unix'.可以看出腳本為我們創建了其他的腳本文件,如下:
builds/unix/config.statusbuilds/unix/unix-cc.mkbuilds/unix/unix-def.mkbuilds/unix/freetype-configbuilds/unix/freetype2.pcbuilds/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/_INSTALLexec_prefix := ${prefix}libdir := ${exec_prefix}/libbindir := ${exec_prefix}/binincludedir := ${prefix}/includedatarootdir := ${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
新聞熱點
疑難解答