Windows 下Apache httpd-2.0.63编译手记

来源:互联网 发布:杭州湖畔网络 编辑:程序博客网 时间:2024/05/19 20:21

 

平台:windows XP
编译工具:Microsoft VC6.0
源码下载:http://apache.mirror.phpchina.com/httpd/
下载版本:httpd-2.0.63-win32-src.zip 19-Jan-2008  09:29 7.9M  HTTP Server project
1) 下载源码后解压,使用VC打开Apache.dsw文件,设置BuildBin classess 工程为Active。
2)开始编译,在编译中VC可能会提示错误。
3)如果编译提示没有找到strings.h和inet.h错误

D:/httpd-2.0.63/srclib/apr/include/apr_want.h(52): Could not find the file strings.h.
D:/httpd-2.0.63/srclib/apr/include/apr_want.h(85): Could not find the file sys/uio.h.
D:/httpd-2.0.63/srclib/apr/include/apr_want.h(103): Could not find the file arpa/inet.h.  

   可以打开httpd-2.0.63/srclib/apr/include/apr_want.h 文件,把以下行注释掉:

 

4) 如果编译时候提示HCRYPTPROV错误:

D:/httpd-2.0.63/srclib/apr/misc/win32/rand.c(33) : error C2065: 'HCRYPTPROV' : undeclared identifier

    打开D:/httpd-2.0.63/srclib/apr/misc/win32/Rand.c 文件,在文件头部添加一行:


5) 如果编译时提示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,以下图以该目录为例子进行添加:



原创粉丝点击