Heim  >  Artikel  >  Backend-Entwicklung  >  MinGW编译nginx加入nginx_dav_ext_module模块

MinGW编译nginx加入nginx_dav_ext_module模块

WBOY
WBOYOriginal
2016-08-08 09:24:421810Durchsuche

用VC编译nginx时加入nginx_dav_ext_module模块后出现各种错误,各种搞不定,只好改用MinGW。
1、先编译expat,把编译完的lib,include,bin什么的都放进MinGW里
2、在ngx_http_dav_ext_module.c里加入#include sys/stat.h,不然会出现一个错误,忘了。
3、make时不认_off_t,在sys/types.h明明有定义,不知道在哪出的问题,在ngx_http_dav_ext_module.c里加入typedef long _off_t;
4、link时说unresolved reference to ‘gmtime_r’,找不到是哪的问题,索性Google了一个gmtime_r函数的定义,考到ngx_http_dav_ext_module.c中并改名为gmtime_s,把文件里的两处都改成gmtime_s通过。

以上就介绍了MinGW编译nginx加入nginx_dav_ext_module模块,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn