0

Hello I am using Qt creator 4.6.0 and MongoDB 4.0 in windows 10 and I have already installed mongo-cxx-dirver-r3.3.0 (c++ drivers for mongodb). The problem is,

#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>

whenever I include this file for making connection. But it was giving error,

error: C1083: Cannot open include file: 'bsoncxx/config/config.hpp': No such file or directory. (in both .hpp config.hpp is included).

But whenever i check in directory of Driver there is no config.hpp file but i found config.hpp.in.

acm
  • 12,183
  • 5
  • 39
  • 68

1 Answers1

0

You need to build and install the driver before you can use it, not just unpack the archive and try to use those files. The config.hpp.in file is a template from which the config.h file is created at build time. Please read the installation instructions: https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/

acm
  • 12,183
  • 5
  • 39
  • 68
  • yes , i read this document but i found installation for visual studio not for Qt creator. – Kartik Maheshwari Jun 16 '18 at 06:25
  • We don't have a specific instructions for Qt Creator. You will need to learn how that IDE integrates with CMake based projects like mongocxx. It isn't possible for the maintainers of a library to know how every IDE in the world works. – acm Jun 16 '18 at 15:17