MinGW/MSYSでFreeTypeをコンパイルしようとして失敗しました
これが私がすることです:
cmd.exe
私が切り替えてからMSYS
:
C:\temp\freetype-2.3.5-1\src\freetype\2.3.5\freetype-2.3.5>bash
そして、configure
スクリプトを呼び出します
bash-3.1$ ./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 `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).
cd builds/unix; ./configure
checking build system type... i686-pc-mingw32
[------ Deleted some 121 lines because they seem irrelevant for the problem ------]
config.status: creating ftconfig.h
make: Nothing to be done for `unix'.
make
freetypeを設定した後、ソースをコンパイルするために使用したいと思います。
bash-3.1$ make
/bin/sh: cygpath: command not found
config.mk:36: /builds/freetype.mk: No such file or directory
config.mk:57: /builds/unix/install.mk: No such file or directory
builds/toplevel.mk:158: /builds/modules.mk: No such file or directory
make: *** No rule to make target `/builds/modules.mk'. Stop.
問題はcygpathにあるようですが、これはcygwinをインストールしていないので奇妙です。
コンパイル命令はgnumakeを義務付けているので、私はこれを検証しました:
bash-3.1$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
私は何を間違えますか?
編集Makefile.mingw
:ディレクトリにもあります。でコンパイルプロセスを開始しようとしてmake -f Makefile.mingw
も終了せず、メッセージが返されます¨make: *** No rule to make target 'MFSED', needed by 'all'. Stop.
。
更新OK、私はこの問題についていくつかの探偵調査を行いましたが、 CygWinをインストールしていないため、問題は正確にあるようです。unix-pathsをwindows-pathsに、またはその逆に変換cygpath
するCygWinユーティリティ(ここを参照)であるため、私はこの仮定を持っています。
ここで、が使用され¨find . -type f -exec grep -l cygpath {} \;
ている場所をいくつか見つけます。cygpath
- ./builds/unix/aclocal.m4
- ./builds/unix/configure
- ./builds/unix/unix-def.in
- ./builds/unix/unix-def.mk
- ./patches/freetype-2.3.4.diff
- ./patches/freetype-2.3.5/builds/unix/unix-def.mk
- ./patches/freetype-2.3.5.diff
ビルドを修正するには、これらの場所の1つ以上で何かを変更する必要があると思います。右?./configure-buildプロセス全体についてより多くの知識を持っている人が、この問題に関するヒントを教えてくれることを今でも望んでいます。
アップデートII:rubenvbの回答から、次の行を削除してみ./configure --build=i686-pc-mingw32
てください。
TOP_DIR := $(shell cd $(TOP_DIR); cygpath -m `pwd`)
でbuilds/unix/unix-def.mk
、行の読みを変更します
RCTOOL_COMPILE = RCTOOL
に
RCTOOL_COMPILE = $(RCTOOL)
http://gnuwin32.sourceforge.net/rctool.sh.txtをに./builds/freetype.mk
コピーし(欠落しているために奇妙なエラーが発生したため)、コンパイルプロセスを。で開始します。c:\mingw\bin
rctool.sh
make
さて、ソースファイルのコンパイルは(少なくとも部分的に)ついに完了したように見えましたが、私は次 のような多くの警告を受けました
./src/base/ftcalc.c:75:3: warning: 'FT_RoundFix' redeclared without dllimport attribute: previous dllimport ignored
しかし、リンカは* .oファイルをリンクできません。これは、次のような未定義の参照が多数あるためです。
C:\temp\freetype-2.3.5-1\src\freetype\2.3.5\freetype-2.3.5/src/base/ftinit.c:89: undefined reference to `_imp__FT_Add_Module'
コンパイル警告はリンカーエラーとは無関係ではないと思います。
ならどうしよう?