Windows下编译nginx的一些笔记(自用)

         折腾很长一段时间nginx在win7下的编译,以前没接触过,诸多不明白,都快放弃了,结果今天从早上查资料一直到快下班,也不知怎么居然编译成功了,N多的报错居然没有了,感觉跟奇迹一样,脑子一片空白,都忘了以前问题是怎么解决的了,现在只能回忆一下,想多少写多少了。

         这是msys生成命令:

         

        
          auto/configure --prefix=d:/n3 \
          --sbin-path=nginx.exe \
          --with-cc-opt=”-DFD_SETSIZE=4096″ \
          --with-cc=cl --builddir=objs \
          --conf-path=objs/conf/nginx.conf \
          --pid-path=logs/nginx.pid \
          --http-log-path=logs/access.log \
          --error-log-path=logs/error.log \
          --http-client-body-temp-path=temp/client_body_temp \
          --http-proxy-temp-path=temp/proxy_temp \
          --http-fastcgi-temp-path=temp/fastcgi_temp \
          --http-scgi-temp-path=temp/scgi_temp \
          --http-uwsgi-temp-path=temp/uwsgi_temp \
          --with-pcre=objs/lib/pcre-8.36 \
          --with-zlib=objs/lib/zlib-1.2.8 \
          --with-select_module \
          --with-http_realip_module \
          --with-http_addition_module \
          --with-http_sub_module \
          --with-http_dav_module \
          --with-http_stub_status_module \
          --with-http_flv_module \
          --with-http_mp4_module \
          --add-module=objs/lib/nginx-rtmp-module-win32 \
          --with-http_gzip_static_module \
          --with-http_random_index_module \
          --with-http_secure_link_module \
          --with-mail \
          --with-openssl=objs/lib/openssl-1.0.1e \
          --with-openssl-opt=enable-tlsext \
          --with-http_ssl_module \
          --with-mail_ssl_module \
          --with-ipv6
          nmake -f objs/Makefile
</pre><pre name="code" class="plain">想到哪记到哪
错误一:libeay32.lib(gost_sign.obj) : warning LNK4099: 未找到 PDB“lib.pdb”(使用“objs/
lib/openssl-1.0.1e/lib/libeay32.lib”或在“d:\n\objs\lib.pdb”中寻找);正在链接
对象,如同没有调试信息一样
解决:随便建一个vc2008空项目,项目->项目属性->c/c++->输出文件下的”程序数据库文件名里“添加”lib.pdb“

         


         本来想着就试试,又一次

     nmake -f objs/Makefile

         结果就通过了,nginx.exe文件生成,这是我碰到的最后一个问题,陆续在补充。。。


错误二:莫名其妙的test语法错误,提示”test“语法错误,并且创建了两个名称分别为”’‘“和”-p“的空文件夹

解决:把objs文件夹下的Makefile用UltraEdit打开,如下图:

     

     将所有test有关的命令删除,例如:test -d '$(DESTDIR)d:/n3' || mkdir -p '$(DESTDIR)d:/n3'   ---->   mkdir -p '$(DESTDIR)d:/n3' 

     如果没有出现上述”test“语法错误的话,就不用删除test相关的命令了

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值