FreeType2.4.6下载地址:
http://sourceforge.net/projects/freetype/files/
加压后放到:msys\1.0\home\Administrator\freetype-2.4.6
命令:
./configure --prefix=/mingw
此处一般不会出现问题,除非搭建的WinGW环境有问题。
- $ ./configure
- FreeType build system -- automatic system detection
- The following settings are used:
- platform unix
- compiler cc
- configuration directory ./builds/unix
- configuration rules ./builds/unix/unix.mk
- If this does not correspond to your system or settings please remove the file
- `config.mk' from this directory then read the INSTALL file for help.
- Otherwise, simply type `C:/MinGW/bin/make' again to build the library,
- or `C:/MinGW/bin/make refdoc' to build the API reference (the latter needs python).
- Generating modules list in ./objs/ftmodule.h...
- * module: truetype (Windows/Mac font files with extension *.ttf or *.ttc)
- * module: type1 (Postscript font files with extension *.pfa or *.pfb)
- * 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.
- $ make
- ./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
- 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
- Assembler messages:
- FATAL: can't create C:/msys/1.0/home/Administrator/freetype-2.4.6/objs/.libs/ftsystem.o: No such file or di rectory
- 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。
- 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 \
- /bin/install -c -m 644 \
- $P /usr/local/include/freetype2/freetype/config ; \
- done
- rm -f /usr/local/include/freetype2/freetype/cache/*
- rmdir /usr/local/include/freetype2/freetype/cache
- rm -f /usr/local/include/freetype2/freetype/internal/*
- rmdir /usr/local/include/freetype2/freetype/internal
- rmdir: `/usr/local/include/freetype2/freetype/internal': No such file or directory
- make: [install] Error 1 (ignored)
- /bin/install -c -m 644 ./builds/unix/ft2unix.h \
- /usr/local/include/ft2build.h
- process_begin: CreateProcess(NULL, /bin/install -c -m 644 ./builds/unix/ft2unix.h /usr/local/include/ft2bui ld.h, ...) failed.
- make (e=3): 系统找不到指定的路径。
- make: *** [install] Error 3
转载于:https://blog.51cto.com/general/662736