I'm trying to build db_mongodb module but i'm facing some
problems, please take a look at logs messages below:
make
CC (gcc) [M db_mongodb.so] mongodb_connection.o
In file included from mongodb_connection.c:24:
mongodb_connection.h:26:20: warning: mongoc.h: No such
file or directory
mongodb_connection.h:27:18: warning: bson.h: No such
file or directory
In file included from mongodb_connection.c:24:
mongodb_connection.h:37: error: expected
specifier-qualifier-list before ‘mongoc_client_t’
mongodb_connection.c: In function
‘db_mongodb_new_connection’:
mongodb_connection.c:48: warning: implicit declaration of
function ‘mongoc_init’
mongodb_connection.c:49: error: ‘km_mongodb_con_t’ has no
member named ‘con’
mongodb_connection.c:49: warning: implicit declaration of
function ‘mongoc_client_new’
mongodb_connection.c:50: error: ‘km_mongodb_con_t’ has no
member named ‘con’
mongodb_connection.c: In function
‘db_mongodb_free_connection’:
mongodb_connection.c:78: error: ‘km_mongodb_con_t’ has no
member named ‘con’
mongodb_connection.c:79: warning: implicit declaration of
function ‘mongoc_client_destroy’
mongodb_connection.c:79: error: ‘km_mongodb_con_t’ has no
member named ‘con’
make: *** [mongodb_connection.o] Error 1
[root@ccp1 db_mongodb]# locate bson.h
/usr/local/include/libbson-1.0/bson.h
/usr/local/src/mongo-c-driver/src/libbson/src/bson/bson.h
/usr/local/src/mongo-c-driver-1.1.10/src/libbson/doc/html/streaming-bson.html
/usr/local/src/mongo-c-driver-1.1.10/src/libbson/src/bson/bson.h
[root@ccp1 db_mongodb]# locate mongoc.h
/usr/local/include/libmongoc-1.0/mongoc.h
/usr/local/src/mongo-c-driver/src/mongoc/mongoc.h
/usr/local/src/mongo-c-driver/tests/test-libmongoc.h
/usr/local/src/mongo-c-driver-1.1.10/src/mongoc/mongoc.h
/usr/local/src/mongo-c-driver-1.1.10/tests/test-libmongoc.h
I have installed mongo-c-driver successfully and the header
files(bson.h, mongoc.h) are located at
/usr/local/src/mongo-c-driver/src/mongoc.