FreeType 2被設(shè)計(jì)為一種占用空間小的、高效的、高度可定制的、并且可以產(chǎn)生可移植的高品質(zhì)輸出(符號(hào)圖像)。可以被用在諸如圖像庫(kù)、展出服務(wù)器、字體轉(zhuǎn)換工具、圖像文字產(chǎn)生工具等多種其它產(chǎn)品上。(百度百科)
編譯器:arm-none-linux-gnueabi-g++
使用系統(tǒng)默認(rèn)編譯器gcc直接編譯
$ ./configure --PRefix=$PWD/_INSTALL --without-zlib$ make & make install直接在當(dāng)前目錄的_INSTALL/生成對(duì)應(yīng)的libfreetype.a以及l(fā)ibfreetype.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表示不使用第三庫(kù)zlib,使用freetype內(nèi)部的相關(guān)函數(shù);
configure結(jié)束后出現(xiàn)日志:
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'.可以看出腳本為我們創(chuàng)建了其他的腳本文件,如下:
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'......所以如果沒(méi)有重新configure修改配置的前提下, 之后的每一次代碼修改都可以直接使用make&make install來(lái)完成編譯工作;
開(kāi)源庫(kù)下載地址: https://www.freetype.org/download.html https://sourceforge.net/projects/freetype/files/ https://sourceforge.net/projects/freetype/files/freetype2/
這里最新的為2.7.1版本,可以直接下載編譯; 或者網(wǎng)速較慢直接使用: http://download.csdn.net/detail/dreamintheworld/9755333
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注