为nginx服务器创建libgd

时间:2011-12-05 20:12:23

标签: c++ nginx

我尝试制作libgd,但我失败了。

我从https://bitbucket.org/pierrejoye/gd-libgd

下载源代码

尝试 cmake 并收到错误:

Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Error at cmake/modules/FindPNG.cmake:59 (MESSAGE):
  Could not find PNG library
Call Stack (most recent call first):
  CMakeLists.txt:49 (FIND_PACKAGE) 

尝试 nmake

C:\Users\Alexandr\Downloads\gd-2.0.35\windows>nmake -f Makefile

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl.exe -I. -I.. -IC:\\gd_build\\gd_deps\\include -nologo -DWIN32 -D_WIN3
2 -DMSWIN32 -DBGDWIN32 /D PATHSEPARATOR="\";\""  /D DEFAULT_FONTPATH="\"C:\\WIND
OWS\\FONTS;C:\\WINNT\\FONTS\""  /D HAVE_FT2BUILD_H  /D HAVE_LIBZ  /D HAVE_GD_BUN
DLED=1   /D HAVE_GD_GIF_READ=1   /D HAVE_GD_GIF_CREATE=1   /D HAVE_GD_IMAGESETBR
USH=1   /D HAVE_GD_IMAGESETTILE=1  /D HAVE_GD_JPG   /D HAVE_GD_PNG   /D HAVE_GD_
STRINGFTEX=1   /D HAVE_GD_STRINGTTF=1   /D HAVE_GD_XBM   /D HAVE_LIBFREETYPE=1
 /D HAVE_LIBJPEG   /D HAVE_LIBPNG   /D USE_GD_IMGSTRTTF /Og /Oi /O2 /Oy /GF /MT
/DNDEBUG /LD -c ..\gd_jpeg.c
cl : Command line warning D9035 : option 'Og' has been deprecated and will be re
moved in a future release
gd_jpeg.c
c:\users\alexandr\downloads\gd-2.0.35\jmorecfg.h(215) : warning C4005: 'FAR' : m
acro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\windef.h(146) : se
e previous definition of 'FAR'
c:\users\alexandr\downloads\gd-2.0.35\jmorecfg.h(227) : error C2371: 'boolean' :
 redefinition; different basic types
        c:\program files\microsoft sdks\windows\v7.0a\include\rpcndr.h(162) : se
e declaration of 'boolean'
..\gd_jpeg.c(853) : warning C4133: '=' : incompatible types - from 'safeboolean
(__cdecl *)(j_decompress_ptr)' to 'boolean (__cdecl *)(j_decompress_ptr)'
..\gd_jpeg.c(985) : warning C4133: '=' : incompatible types - from 'safeboolean
(__cdecl *)(j_compress_ptr)' to 'boolean (__cdecl *)(j_compress_ptr)'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\cl.exe"' : return code '0x2'

我没有使用C和C ++,我停滞不前。我的服务器需要libgd,但有两天我没有进展

1 个答案:

答案 0 :(得分:0)

试试这个:

cmake -ZLIB_LIBRARY:FILEPATH =“path / to / zlib / zlib.lib”-ZLIB_INCLUDE_DIR:PATH =“path / to / zlib / include”...