文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Windows 下Apache httpd-2.2.11编译手记

Windows 下Apache httpd-2.2.11编译手记

时间:2009-04-01  来源:ftomorrow

平台:windows XP
编译工具:Microsoft VC6.0
源码下载:http://apache.mirror.phpchina.com/httpd/
下载版本:httpd-2.2.11-win32-src-r2.zip     06-Jan-2009 02:55  9.6M  HTTP Server project
1) 下载源码后解压,使用VC打开Apache.dsw文件,设置BuildBin classess 工程为Active。
2)开始编译,在编译中VC可能会提示错误。
3)如果编译提示没有找到strings.h和inet.h 错误:
D:\httpd-2.2.11\srclib\apr\include\apr_want.h(52): Could not find the file strings.h
D:\httpd-2.2.11\srclib\apr\include\apr_want.h(121): Could not find the file arpa/inet.h  
   打开httpd-2.2.11\srclib\apr\include\apr_want.h 文件,把以下行注释掉:
#if APR_HAVE_STRINGS_H
#include <strings.h>
#endif

#if APR_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

4) 如果编译时候提示不支持LDAP v2.0错误:
apr_ldap_stub.c
./include\apr_ldap.h(132) : fatal error C1189: #error :  Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
apr_ldap_url.c
apr_ldap_url.c
./include\apr_ldap.h(132) : fatal error C1189: #error :  Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
Generating Code...
    打开httpd-2.2.11\srclib\apr-util\include\apr_ldap.h 文件,注释该行代码:
#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.
5) 如果出现identifier 'SQLLEN' 错误:
D:httpd-2.2.11\srclib\apr-util\dbd\apr_dbd_odbc.c(134) : error C2061: syntax error : identifier 'SQLLEN'
    打开文件:httpd-2.2.11\srclib\apr-util\dbd\apr_dbd_odbc.c,在文件头部添加以下行:
typedef INT32 SQLLEN;
6) 如果出现LDAP_VENDOR_NAME 错误:
D:\httpd-2.2.11\srclib\apr-util\ldap\apr_ldap_init.c(194) : error C2146: syntax error : missing ';' before identifier 'LDAP_VENDOR_NAME'
D:\httpd-2.2.11\srclib\apr-util\ldap\apr_ldap_init.c(195) : error C2065: 'LDAP_VENDOR_NAME' : undeclared identifier
D:\httpd-2.2.11\srclib\apr-util\ldap\apr_ldap_init.c(195) : error C2143: syntax error : missing ';' before 'string'
   打开httpd-2.2.11\srclib\apr-util\ldap\apr_ldap_init.c 文件,注释以下行:
LDAP_VENDOR_NAME
7) 如果出现WtsApi32.h没有包含错误:
D:\httpd-2.2.11\support\win32\ApacheMonitor.c(45) : fatal error C1083: Cannot open include file: WtsApi32.h': No such file or directory
   该提示表示没有安装或配置Microsoft 的PlatformSDK,需要去微软网站上下载PlatformSDK,并安装。
8) 如果提示awk 错误:
'awk' 不是内部或外部命令,也不是可运行的程序或批处理文件。
Error executing c:\windows\system32\cmd.exe.
   这个错误是由于没有安装awk工具导致,可以先到http://www.gnu.org/software/gawk/ 下载一个gawk进行安装。如果安装的目录为:C:\Program Files\GnuWin32,在该目录下可以看到一个bin目录,需要把该目录添加到VC Executable files。我的bin目录完整路径为:C:\Program Files\GnuWin32\bin,以下图以该目录为例子进行添加:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" src="http://photo16.hexun.com/p/2009/0311/304816/b_92CAC6AC57779723DC6892066DCC924E.jpg" alt="查看更多精彩图片" border="0">

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" src="http://photo16.hexun.com/p/2009/0311/304816/b_029264A1BF560A13E5700C6784BC79A4.jpg" alt="查看更多精彩图片" border="0">

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" src="http://photo16.hexun.com/p/2009/0311/304816/b_5CD6E9B03B1A0C5EBD64C42040A988F0.jpg" alt="查看更多精彩图片" border="0">

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载