windows下vc编译和debug nginx
总体来说,各个步骤以及版本参考官方文档http://nginx.org/en/docs/howto_build_on_win32.html一点没错,有些细节没说清楚。
To build nginx:
- Start MSYS bash.
- Check out nginx sources from the hg.nginx.org repository. For example: 必须使用源代码仓库中的版本,tar.gz发行包中的虽然是源码,但是不包含windows平台库,否则会提示缺少windows相关头文件
hg clone http://hg.nginx.org/nginx
- Create a build and lib directories, and unpack zlib, PCRE and OpenSSL libraries sources into lib directory:
mkdir objs
mkdir objs/lib
cd objs/lib
tar -xzf ../../pcre-8.41.tar.gz
tar -xzf ../../zlib-1.2.11.tar.gz
tar -xzf ../../openssl-1.0.2n.tar.gz - Run configure script: windows下中文简体编译的时候,先将ssl/bad_dtls_test.c编码格式改为unicode或者gb2312,否则默认警告视为错误会编译出错
auto/configure \
--with-cc=cl \
--with-debug \
--prefix= \
--conf-path=conf/nginx.conf \
--pid-path=logs/nginx.pid \
--http-log-path=logs/access.log \
--error-log-path=logs/error.log \
--sbin-path=nginx.exe \
--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-cc-opt=-DFD_SETSIZE=1024 \
--with-pcre=objs/lib/pcre-8.41 \
--with-zlib=objs/lib/zlib-1.2.11 \
--with-openssl=objs/lib/openssl-1.0.2n \
--with-openssl-opt=no-asm \
--with-select_module \
--with-http_ssl_module - Run make: 在vs命令行下执行,而不是msys窗口
nmake
nginx.exe生成后,双击启动的时候立刻就消失了。从cmd打开执行,可以知道是少了error/conf/temp等目录所致,自己看提示应该可以解决。
参考:
http://nginx.org/en/docs/howto_build_on_win32.html
https://blog.csdn.net/i348018533/article/details/51701865
https://blog.csdn.net/hard_cold/article/details/13989337
http://www.xuebuyuan.com/739815.html
https://www.itsvse.com/thread-2784-1-1.html
https://blog.csdn.net/a923751813/article/details/50511007
https://www.ruby-forum.com/topic/6875190
后面有时间开始debug继续出。
windows下vc编译和debug nginx的更多相关文章
- 原创 C++应用程序在Windows下的编译、链接:第一部分 概述
本文是对C++应用程序在Windows下的编译.链接的深入理解和分析,文章的目录如下: 我们先看第一章概述部分. 1概述 1.1编译工具简介 cl.exe是windows平台下的编译器,link.ex ...
- C++应用程序在Windows下的编译、链接(一)概述
C++应用程序在Windows下的编译.链接(一)概述 本文是对C++应用程序在Windows下的编译.链接的深入理解和分析,文章的目录如下: 我们先看第一章概述部分. 1概述 1.1编译工具简介 c ...
- ACE在windows下的编译及配置(VS2010)
ACE在windows下的编译及配置(VS2010) 分类: -[小西南]- 2013-08-06 16:17 2354人阅读 评论( ...
- Windows 下VC++6.0制作、使用动态库和静态库
Windows 下VC++6.0制作.使用动态库和静态库 一.VC++6.0制作.使用静态库 静态库制作 1.如图一在VC++6.0中new一个的为win32 static library工程并新建一 ...
- Windows下PythonQt编译(vs2015+Qt5.11.2+PythonQt 3.2)探索
时间:2018年10月20日 笔者最近在做Qt方面的开发工作,需用到脚本程序对程序内部进行扩展,就很自然的想到了PythonQt,下面介绍PythonQt在Windows下的的安装编译心得,水平有限, ...
- 【FFmpeg】Windows下FFmpeg编译
由于FFmpeg是基于Linux开发的开源项目,源代码和Windows下最常见的Visual Studio提供的C/C++编译器不兼容,因此它不能使用MSVC++编译,需要在Windows下配置一个类 ...
- [转]QGis2.9在windows下的编译以及二次开发包下载
今天心血来潮,将QGis在github上的代码更新后,又编译了一下.留意到源代码包里面的INSTALL文件有更新,于是本次编译完全基于官方的编译说明.编译过程非常顺利,除了在CMake的第一次conf ...
- windows下rabbitmq-c编译(带openssl、无需MinGW)
因为项目原因,需要使用到rabbitmq的c客户端库.首先,参见上一篇windows下openssl编译,如果已经使用cmake编译过了,则先delete cache(File-Delete Cach ...
- 设置 Quick-Cocos2d-x 在 Windows 下的编译环境
http://cn.cocos2d-x.org/tutorial/show?id=1304 设置 Quick-Cocos2d-x 在 Windows 下的编译环境 Liao Yulei2014-08- ...
随机推荐
- [LeetCode] 374. Guess Number Higher or Lower_Easy tag: Binary Search
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to gues ...
- python 格式化字符串"%s"%
%s 字符串 (采用str()的显示) %r 字符串 (采用repr()的显示) %c 单个字符 %b 二进制整数 %d 十进制整数 %i 十进制整数 %o ...
- rosetta mpi编译时出现 MPI has not been declared 错误
安装openmpi2.1.0版本,编译mpi rosetta时出现 MPI has not been declared 错误,经过一系列的摸索发现安装openmpi-1.6.5就可以顺利编译,降低版本 ...
- UGUI 打图集
using UnityEngine; using System.Collections; using UnityEditor; using System.Collections.Generic; us ...
- 网站的title添加图片
将图片作为ico格式,大小设置为16 * 16px左右,太大显示不完整, 命名需为"favicon.ico", 命名需为"favicon.ico", 命名需为& ...
- python文件基础IO,OS
#!/usr/bin/python # -*- coding: UTF-8 -*- import os # 导入 Phone 包 #File 对象方法: file对象提供了操作文件的一系列方法. #O ...
- springboot整合webSocket的使用
引入jar包 <dependency><!-- 5.引入websocket--> <groupId>org.springframework.boot</gro ...
- OWASP top 10
OWASP Top 10 A1: InjectionSolution+Validate User Input+Never concatenate queries and date+Parameteri ...
- 加快cin读取速度
cin在读取大量数据时会比C里的scanf慢很多,但这并不是cin"无能",而是C++为了兼容C,对cin做了scanf的同步,只要关闭这个同步,cin就会有不弱于scanf的速度 ...
- Mysql常规优化
一.SQL语句优化 (1)使用limit对查询结果的记录进行限定(2)避免select *,将需要查找的字段列出来(3)使用连接(join)来代替子查询(4)拆分大的delete或insert语句 二 ...