gpt4 book ai didi

windows - 将 PHP + Libpuzzle 编译到 Windows

转载 作者:可可西里 更新时间:2023-11-01 14:36:39 25 4
gpt4 key购买 nike

我在这里得到了 libpuzzle 源代码:http://www.pureftpd.org/project/libpuzzle/download .

我读到我需要 MinGW 来在 Windows 上编译任何 C 程序,所以我得到了很多 C、C++ 和 mins 选项。使用分钟我被跟踪:http://wiki.openttd.org/Compiling_on_MinGW

我下载了.tar.gz并解压,执行./configure命令得到:

找不到 libgd2 开发文件

自述文件中给出的意义:

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”但只是“gd”或者我没有开发文件的文件。我在哪里可以找到我需要的东西?

这是 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 最终工作,我仍然需要 phpize 用于 mingw,这也不适用于 mingw。似乎不能使用 libpuzzle for windows

最佳答案

听起来程序只是没有找到 libgd 的 header 。如果您查看那个 tarbar,它是一个包含 header 的源 tarball。当您编译并安装它时,它会在某处安装库和头文件。你需要弄清楚在哪里。

运行./configure --help

应该有一个像 --with-gd= 这样的选项,这个选项可以让你告诉它 libgd 的安装路径。指定它的安装路径,它应该可以工作。

关于windows - 将 PHP + Libpuzzle 编译到 Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13996916/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com