Mingw編譯安裝FreeType2.4.6

FreeType2.4.6下載地址:

http://sourceforge.net/projects/freetype/files/

 

加壓後放到:msys\1.0\home\Administrator\freetype-2.4.6

命令:

./configure --prefix=/mingw

此處一般不會出現問題,除非搭建的WinGW環境有問題。

 

  1. $ ./configure  
  2.  
  3. FreeType build system -- automatic system detection 
  4.  
  5. The following settings are used: 
  6.  
  7.   platform                    unix 
  8.   compiler                    cc 
  9.   configuration directory     ./builds/unix 
  10.   configuration rules         ./builds/unix/unix.mk 
  11.  
  12. If this does not correspond to your system or settings please remove the file 
  13. `config.mk' from this directory then read the INSTALL file for help. 
  14.  
  15. Otherwise, simply type `C:/MinGW/bin/make' again to build the library, 
  16. or `C:/MinGW/bin/make refdoc' to build the API reference (the latter needs python). 
  17.  
  18. Generating modules list in ./objs/ftmodule.h... 
  19. * module: truetype  (Windows/Mac font files with extension *.ttf or *.ttc) 
  20. * module: type1     (Postscript font files with extension *.pfa or *.pfb) 
  21. * module: cff       (OpenType fonts with extension *.otf) 

 

make

此處出錯,說在此處創建ftsystem文件失敗 freetype-2.4.6/objs/.libs/ftsystem.o,原來在freetype-2.4.6/objs/下沒有.libs文件夾。

freetype-2.4.6/objs/下執行

mkdir .libs

重新make,OK.

  1. $ make 
  2. ./builds/unix/libtool --mode=compile gcc -pedantic -ansi  -IC:/msys/1.0/home/Administrator/freetype-2.4.6/o                               bjs -I./builds/unix -IC:/msys/1.0/home/Administrator/freetype-2.4.6/include -c -Wall -g -O2 -DFT_CONFIG_CON                               FIG_H="<ftconfig.h>" -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H="<ftmodule.h>"  -o C:/msys/1.0/home/Administ                               rator/freetype-2.4.6/objs/ftsystem.lo C:/msys/1.0/home/Administrator/freetype-2.4.6/src/base/ftsystem.c 
  3. libtool: compile:  gcc -pedantic -ansi -IC:/msys/1.0/home/Administrator/freetype-2.4.6/objs -I./builds/unix                                -IC:/msys/1.0/home/Administrator/freetype-2.4.6/include -c -Wall -g -O2 "-DFT_CONFIG_CONFIG_H=<ftconfig.h>                               " -DFT2_BUILD_LIBRARY "-DFT_CONFIG_MODULES_H=<ftmodule.h>" C:/msys/1.0/home/Administrator/freetype-2.4.6/sr                               c/base/ftsystem.c  -DDLL_EXPORT -DPIC -o C:/msys/1.0/home/Administrator/freetype-2.4.6/objs/.libs/ftsystem.                               o 
  4. Assembler messages: 
  5. FATAL: can't create C:/msys/1.0/home/Administrator/freetype-2.4.6/objs/.libs/ftsystem.o: No such file or di                               rectory 
  6. make: *** [C:/msys/1.0/home/Administrator/freetype-2.4.6/objs/ftsystem.lo] Error 1 

 

make install

出錯,原因是找不到install指令。解決方法:在freetype-2.4.6\builds\unix找到unix-def.mk

INSTALL         := /bin/install -c

改成

INSTALL         := c:/msys/1.0/bin/install -c

prefix       := C:\msys\1.0\mingw

改成

prefix       := /mingw

重新執行make install OK。

 

  1. for P in C:/msys/1.0/home/Administrator/freetype-2.4.6/include/freetype/config/ftconfig.h C:/msys/1.0/home/                               Administrator/freetype-2.4.6/include/freetype/config/ftheader.h C:/msys/1.0/home/Administrator/freetype-2.4                               .6/include/freetype/config/ftmodule.h C:/msys/1.0/home/Administrator/freetype-2.4.6/include/freetype/config                               /ftoption.h C:/msys/1.0/home/Administrator/freetype-2.4.6/include/freetype/config/ftstdlib.h  C:/msys/1.0/h                               ome/Administrator/freetype-2.4.6/objs/ftmodule.h  ; do                                  \ 
  2.           /bin/install -c -m 644                                           \ 
  3.             $P /usr/local/include/freetype2/freetype/config ; \ 
  4.         done 
  5. rm -f /usr/local/include/freetype2/freetype/cache/* 
  6. rmdir /usr/local/include/freetype2/freetype/cache 
  7. rm -f /usr/local/include/freetype2/freetype/internal/* 
  8. rmdir /usr/local/include/freetype2/freetype/internal 
  9. rmdir: `/usr/local/include/freetype2/freetype/internal': No such file or directory 
  10. make: [install] Error 1 (ignored) 
  11. /bin/install -c -m 644 ./builds/unix/ft2unix.h \ 
  12.           /usr/local/include/ft2build.h 
  13. process_begin: CreateProcess(NULL, /bin/install -c -m 644 ./builds/unix/ft2unix.h /usr/local/include/ft2bui                               ld.h, ...) failed. 
  14. make (e=3): 系統找不到指定的路徑。 
  15. make: *** [install] Error 3 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章