Home >Backend Development >PHP Tutorial >Handling issues related to compiling nginx under windows platform
Contents [hide]
FAQ
The VS version I am using is VS2008 and I encountered the following problems.
Get the specified version
Sometimes what we need is not the latest version. For example, I want to download the 1.20 version of nignx. First, I look for the version number of 1.20 here. Soon I find it is f582d662cc408eb7a132c21f4b298b71d0701abb. The following execution sequence You can get the specified version:
"stdint.h": No such file or directory
This problem is easy to solve, just download the missing header file. https://code.google.com/p/msinttypes/
After decompression, put the header file directory under C:Program FilesMicrosoft Visual Studio 9.0VCinclude (or a similar directory).
“openssl/ssl.h”: No such file or directory
When executing nmake -f objs/Makefile , such a problem may occur. We see such a path (objs/lib/openssl-1.0.1e/openssl/include), but it actually does not exist. The solution is to change openssl-1.0.1e/openssl to openssl-1.0.1e.
Or directly modify the configuration of the generated Makefile
Unable to open the file "objs/lib/openssl-1.0.1e/lib/ssleay32.lib"
I don’t know why the nginx project does not generate openssl library, I solved this problem by compiling and generating openssl separately. The steps are as follows:
Okay, put the manually generated libeay32.lib and ssleay32.lib into the directory nginx /objs/lib/openssl-1.0.1e. problem solved.
error C2220: Warning is treated as error – "object" file is not generated
Remove the -WX field of CFLAGS, then regenerate the Makefile and recompile
fatal error C1010 : Unexpected end-of-file encountered while looking for precompiled headers. Did you forget to add "#include "ngx_config.h""?
Problems encountered in the development of windows modules. The first line of code in each source file must be added #include "ngx_config.h"*. If you don't want to do this, just compile the parameters*- Remove Yungx_config.h.
Completely compile every time
When executing this line of code nmake -f objs/Makefile, it must be fully compiled every time, which is a waste of time. In this way, there is a line in the file objs/Makefile:
ssh.h The file depends on objs/Makefile*, but if the modification time of the former is always earlier than that of the latter, the following commands will always be executed. Just remove the string *objs/Makefile
Summary of operation process
参考资料:
Windows下OpenSSL安装配置
本文由吴遥编写,转载请注明出处。
文章链接:http://www.wuyao721.com/nginx-building-windows.html
以上就介绍了windows平台下编译nginx相关问题处理,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。