Windows VC compilation and debug Nginx

Source: Internet
Author: User

Overall, the steps and the version reference official document http://nginx.org/en/docs/howto_build_on_win32.html a little bit right, some of the details are not clear.

To build Nginx:

  • Start MSYS Bash.
  • Check out nginx sources from the hg.nginx.org repository. For example: The version in the source repository must be used, although the source code in the tar.gz release package, but does not contain the Windows platform Library, will prompt missing Windows related header files
    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 objsmkdir OBJS/LIBCD Objs/libtar-xzf. /.. /pcre-8.41.tar.gztar-xzf. /.. /zlib-1.2.11.tar.gztar-xzf. /.. /openssl-1.0.2n.tar.gz
  • Run Configure Script:windows in Chinese Simplified compilation, the SSL/BAD_DTLS_TEST.C encoding format is changed to Unicode or gb2312, otherwise the default warning is treated as an error compilation error
    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: Executes under the VS command line, not Msys window
    Nmake

After the Nginx.exe is generated, the double-click starts immediately disappears. From the cmd open execution, you can know is less error/conf/temp, such as the directory caused by their own look tips should be able to solve.

Reference:

Http://nginx.org/en/docs/howto_build_on_win32.html

51701865

13989337

Http://www.xuebuyuan.com/739815.html

Https://www.itsvse.com/thread-2784-1-1.html

50511007

https://www.ruby-forum.com/topic/6875190

There is time to start Debug and continue out later.

Windows VC compilation and debug Nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.