Connecting Mongodb to C++ API #include problems -


i got mongoshell , json file set up. need connecting mongodb c++

i typed in command prompt gave a syntax error. (my file name connectormain.cpp)

-i/usr/local/include -l/usr/local/lib -pthread -lmongoclient -lboost_thread-mt -lboost_filesystem -lboost_program_options -lboost_system app/connectormain.cpp -o connectormain

this person had same problem: mongo c++ driver: mongo/client/dbclient.h: no such file or directory

the reason there need type in cmd pmt because allow access weird #inclue files like: #include "mongo/client/dbclient.h"

i've visited http://api.mongodb.org/cplusplus/current/files.html

and dbclient.h file

    #pragma once     #ifdef mongo_expose_macros     #error dbclient.h c++ driver consumer use     #endif     #define libmongoclient_consumer     #include "mongo/client/redef_macros.h"     #include "mongo/pch.h"     #include "mongo/client/connpool.h"     #include "mongo/client/dbclient_rs.h"     #include "mongo/client/dbclientcursor.h"     #include "mongo/client/dbclientinterface.h"     #include "mongo/client/gridfs.h"     #include "mongo/client/init.h"     #include "mongo/client/sasl_client_authenticate.h"     #include "mongo/client/syncclusterconnection.h"     #include "mongo/util/net/ssl_options.h"     #include "mongo/client/undef_macros.h" 

and crazy cause of headers trying figure out how hook , forum says has setting -i or -l because relates forum http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-cpp-driver/#installing-the-driver-library-and-headers in linux.

please if know how this. p.s. need download boost , perl or saw on post. anyways appreciated!


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -