Nginx-gridfs编译#error在Mac中必须具有64位int类型



运行10.7.2遵循指南配置比附加CFLAGS=-W没有错误绕过错误,比我在上卡住

In file included from /usr/local/src/nginx-gridfs/mongo-c-driver/src/bson.h:24,
                 from /usr/local/src/nginx-gridfs/mongo-c-driver/src/mongo.h:24,
                 from /usr/local/src/nginx-gridfs/ngx_http_gridfs_module.c:43:
/usr/local/src/nginx-gridfs/mongo-c-driver/src/platform.h:50:2: error: #error must have a 64bit int type
make[1]: *** [objs/addon/nginx-gridfs/ngx_http_gridfs_module.o] Error 1
make: *** [build] Error 2

知道吗?

我在为Windows编译时也遇到过同样的问题。您需要确保您有一个int64_t和uint64_t的typedef。

为了解决这个问题,我需要确保定义了MONGO_USE__INT64

对于Mac,几乎可以肯定有unistd.h可用,因此请确保定义MONGO_have_unistd

最新更新