如何在Linux下編譯Freetype1.x

來源:互聯網
上載者:User

由於在PHP程式中用了jpgraph,需要TTF支援。需要安裝freetype1.x。

編譯freetype1.3.1的時候不能編譯通過.其錯誤如下.
ftdump.c:172:1: pasting "." and "glyph_object" does not give a valid preprocessing token
ftdump.c:182:1: pasting "." and "first_instance" does not give a valid preprocessing token
ftdump.c:191:1: pasting "." and "second_instance" does not give a valid preprocessing token
ftdump.c:201:1: pasting "." and "face_object" does not give a valid preprocessing token
ftdump.c:202:1: pasting "." and "glyph_object" does not give a valid preprocessing token
ftdump.c:203:1: pasting "." and "second_instance" does not give a valid preprocessing token
ftdump.c:863:1: pasting "." and "initial_overhead" does not give a valid preprocessing token
ftdump.c:882:1: pasting "." and "face_object" does not give a valid preprocessing token
make[1]: *** [ftdump.o] Error 1
make[1]: Leaving directory `/software/freetype-1.3.1/test'
make: *** [tttest] Error 2

在freetype網站上看了文檔 http://freetype.sourceforge.net/freetype1/docs/faq/freetype1.txt,應該是測試程式在Linux平台不能編譯吧。

修改Makefile.in:
1. 去掉all: ttlib tttest ttpo中的tttest
2. 刪除
install:
        cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) uninstall
        cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) uninstall
        cd $(FTPODIR); $(MAKE) uninstall
中的 cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) uninstall

# ./configure --prefix=/Data/apps/freetype1
# make
# make install

  最後提醒一下,如果以前在PHP中編譯了GD,一定要加入--with-freetype重新編譯GD,否則在PHP上是不能獲得Freetype支援的

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.