MongoDB GridFS介绍与nginx-gridfs编译问题

 


规范
文档
示例


nginx-gridfs编译

1、编译时,报错:
src/core/ngx_times.c: In function ‘ngx_time_update’:
src/core/ngx_times.c:136: error: ‘timezone’ undeclared (first use in this function)
src/core/ngx_times.c:136: error: (Each undeclared identifier is reported only once
src/core/ngx_times.c:136: error: for each function it appears in.)
make[1]: *** [objs/src/core/ngx_times.o] Error 1
make: *** [build] Error 2

这是因为在nginx中,timezone是作为函数使用的。而在cgwin环境下,把timezone当成了个变量。
修改头文件os\unix\ngx_posix_config.h中timezone的定义:
#define timezonevar
改为:
extern long timezone __asm__ ("__timezone");
再编译即可。

cgywin timezone的问题,具体请参照(http://cygwin.com/ml/cygwin/2008-01/msg00449.html


2、 由于gcc 编译 时指定的选项- Werror 导致的,将所有的警告视为错误。可以在Makefile中将它去掉。

你可能感兴趣的:(mongodb,nginx,gcc)