我了解到在Windows上编译任何C程序都需要MinGW,所以我安装了包括C、C++和mins选项的MinGW。使用mins选项时,我按照http://wiki.openttd.org/Compiling_on_MinGW中的步骤进行。
我下载了.tar.gz文件并解压缩,执行了./configure命令,但是出现了以下提示信息:
libgd2 development files are not found
考虑到readme中的说明,这是有道理的。In order to load images, the library relies on the GD2 library.
You need to install gdlib2 and its development headers before compiling
libpuzzle.
The GD2 library is available as a pre-built package for most operating systems.
Debian and Ubuntu users should install the "libgd2-dev" or the "libgd2-xpm-dev"
package.
Gentoo users should install "media-libs/gd".
OpenBSD, NetBSD and DragonflyBSD users should install the "gd" package.
MacPorts users should install the "gd2" package.
X11 support is not required for the Puzzle library.
Once GD2 has been installed, configure the Puzzle library as usual:
目前我的问题是找到一个libgd2-dev或类似的文件进行编译。我在这里找到了这个链接:http://mldonkey.sourceforge.net/Windows,并下载了http://www.boutell.com/gd/http/gd-2.0.33.tar.gz,安装很顺利。运行gdlib-config
输出典型的man。然而,libpuzzle仍然说我需要“libgd2开发文件”,因此我认为我下载的gd是“libgd”,但只是没有开发文件,或者我拥有的文件没有开发文件。我应该去哪里找到我需要的内容?
以下是mingw的输出:
Brian@2500K ~/libpuzzle-0.11
$ gdlib-config
Print information on GD library's version, configuration, and use.
Usage: gdlib-config [options]
Options:
--libdir # directory where GD library is installed
--includedir # directory where GD library headers are installed
--version # complete GD library version string
--majorversion # GD library major version number
--minorversion # GD library minor version number
--revision # GD library revision version number
--ldflags # options required for linking against GD library
--libs # libs required for linking against GD library
--cflags # options required for compiling GD library apps
--includes # same as --cflags
--features # lists optional features compiled into gd, separated
# by spaces. Currently (as of 2.0.26) the optional
# features are GD_PNG, GD_JPEG, GD_XPM, and
# GD_FREETYPE. When these features are reported by
# --features, it is safe to include calls to the
# related functions in your code.
--all # print a summary of all GD library configure options
Brian@2500K ~/libpuzzle-0.11
$ gdlib-config --includedir
/usr/local/include
Brian@2500K ~/libpuzzle-0.11
$ ./configure
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... no, using cp -p
checking whether make sets $(MAKE)... (cached) yes
checking for gdlib-config... /usr/local/bin/gdlib-config
checking for gdImageCreateFromGd2 in -lgd... no
configure: error: libgd2 development files not found
编辑:发起了一个悬赏。我正在寻求为我编译libpuzzle,以便它在WAMP上正常工作(跳过中间复杂的部分)。或者帮助获取每个所需的要求,以便我可以编译它。我的最终目标是让libpuzzle在wamp上运行
编辑2:只是一个更新,似乎libgd2在mingw上有问题。即使我最终能够使libgd2正常工作,那么我仍然需要mingw的phpize,这对于mingw也不起作用。似乎无法在Windows上使用libpuzzle