首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将PHP + Libpuzzle编译到Windows

将PHP + Libpuzzle编译到Windows
EN

Stack Overflow用户
提问于 2012-12-22 04:38:27
回答 2查看 1.1K关注 0票数 4

我在这里找到了这个字谜的来源:http://www.pureftpd.org/project/libpuzzle/download

我读到我需要MinGW来编译任何windows上的C程序,所以我得到了很多C,C++和mins选项。使用mins时,我被关注了:http://wiki.openttd.org/Compiling_on_MinGW

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

libgd2 development files are not found

在自述文件中给出了合理的解释:

代码语言:javascript
复制
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输出:

代码语言:javascript
复制
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上也不起作用。这似乎是不可能使用libpuzzle for windows

EN

回答 2

Stack Overflow用户

发布于 2013-01-01 01:04:03

听起来好像程序没有找到libgd的头文件。如果你看一下这个tarbar,它是一个包含头文件的源码tarball。当您编译和安装它时,它会在某个地方安装库和头文件。你得弄清楚是在哪里。

运行./configure --help

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

票数 0
EN

Stack Overflow用户

发布于 2014-09-01 06:16:00

我自己编译GD2的时候也遇到了同样的错误。

使用GnuWin32的旧预编译版本解决了这个问题:

http://sourceforge.net/projects/gnuwin32/files/gd/2.0.33-1/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13996916

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档