在 win7 中编译Apache2.0.64

       一下仅是自己遇到的问题。

         调试环境:编译器:vc++6.0, 操作系统:win7 32位

 

问题1: 

E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(33) : error C2065: 'HCRYPTPROV' : undeclared identifier
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(33) : error C2146: syntax error : missing ';' before identifier 'hProv'
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(33) : error C2065: 'hProv' : undeclared identifier
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(34) : error C2275: 'apr_status_t' : illegal use of this type as an expression
        ./include\apr_errno.h(44) : see declaration of 'apr_status_t'
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(34) : error C2146: syntax error : missing ';' before identifier 'res'
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(34) : error C2065: 'res' : undeclared identifier
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(39) : error C2275: 'DWORD' : illegal use of this type as an expression
        D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(141) : see declaration of 'DWORD'
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(39) : error C2146: syntax error : missing ';' before identifier 'flags'
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(39) : error C2065: 'flags' : undeclared identifier
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(40) : error C2065: 'CRYPT_VERIFYCONTEXT' : undeclared identifier
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(42) : warning C4013: 'CryptAcquireContext' undefined; assuming extern returning int
E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\rand.c(42) : error C2065: 'PROV_RSA_FULL' : undeclared identifier

解决方法:

打开 E:\sourcecode\apache\httpd-2.0.64\srclib\apr\misc\win32\Rand.c
在文件头部添加一行:
#define   _WIN32_WINNT   0x0500 

问题2:

'awk' 不是内部或外部命令,也不是可执行运行的程序或批处理文件。

执行 c:\windows\system32\cmd.exe

问题原因是因为本机器中没有装awk,

解决方法:

安装 awk,去 http://sourceforge.net/projects/gnuwin32/files/gawk/3.1.6-1/   下载一个安装。

例如,我安装到 E:\sourcecode\apache\gawk-3.1.6-1-bin 目录中,然后将这个目录,添加到vc的需要把该目录添加到VC Executable files(VC 可执行文件中),

添加方法: 菜单 Tools(工具)->  Options(选项)

在弹出的选项卡中选择 'Directories(目录)" ->选择"Show directories for:"下拉框中的 "Executable files"选项 添加一项

内容为"E:\sourcecode\apache\gawk-3.1.6-1-bin"

以下是图解过程:

 

问题三:

编译成功后,Apache运行的时候,弹出"无法启动此程序,因为计算机中丢失 libapr.dll。尝试重新安装该程序以解决此问题"、

"无法启动此程序,因为计算机中丢失 libapriconv.dll。尝试重新安装该程序以解决此问题"

"无法启动此程序,因为计算机中丢失 libaprutil.dll。尝试重新安装该程序以解决此问题"

解决方法:主要是工程的从属关系没有设置好。只要设置一下就行了。 菜单 工程->从属性 ,将所有的设置给Apache就行了。 

问题四:

Apache.exe: could not open documnet config file  这里是一目录,请注意目录不能用汉语和有空格的。

 

blog:http://blog.csdn.net/rentiansheng/article/details/8296279

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值