After adding the nginx_dav_ext_module module when compiling nginx with VC, various errors occurred. I couldn’t figure it out, so I had to use MinGW instead.
1. Compile expat first, and put the compiled lib, include, bin, etc. into MinGW
2. Add #include sys/stat.h to ngx_http_dav_ext_module.c, otherwise an error will appear and be forgotten.
3. _off_t is not recognized when making. It is clearly defined in sys/types.h. I don’t know where the problem is. Add typedef long _off_t in ngx_http_dav_ext_module.c;
4. When linking, it said unresolved reference to 'gmtime_r', but I couldn't find the problem. I simply Googled the definition of the gmtime_r function, found it in ngx_http_dav_ext_module.c and renamed it gmtime_s, and changed both places in the file to gmtime_s. pass.
The above introduces how MinGW compiles nginx and adds the nginx_dav_ext_module module, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.