0

I'am trying to compile mongo-c-driver from this link regarding to described in this link. I have compiled libbson successfulty, when i try to below command I get The source directory "/" does not appear to contain CMakeLists.txt.

cmake -G "Visual Studio 14 2015 Win64" \ "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" \ "-DBSON_ROOT_DIR=C:\mongo-c-driver"
Neil Lunn
  • 148,042
  • 36
  • 346
  • 317
Enes Köroğlu
  • 184
  • 5
  • 15
  • You need to be a bit more descriptive about what you have actually done. You get errors typically because you have not really followed the instructions given. – Neil Lunn Jul 14 '17 at 11:28
  • @NeilLunn I downloaded "Source code (tar.gz)" file from [this address](https://github.com/mongodb/mongo-c-driver/releases). Regarding to Builnding in windows section in [this link](http://mongoc.org/libmongoc/current/installing.html#building-on-windows) and started to run commands, libbson compiled and installed successfully. Then run `cd c:\mongo-c-driver-1.6.3` command and then I got error when running this command: `cmake -G "Visual Studio 14 2015 Win64" \ "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" \ "-DBSON_ROOT_DIR=C:\mongo-c-driver"` – Enes Köroğlu Jul 14 '17 at 13:12

1 Answers1

2

Use vcpkg. follow instruction as mentioned on git https://github.com/Microsoft/vcpkg

step 1

C:\vcpkg>.\vcpkg search mongodb

Step 2

C:\vcpkg>.\vcpkg install mongo-c-driver

step 3

vcpkg integrate install

then simply use visual studio to include. vcpkg is smart it will do all background jobs for you.

you might be interested in it. How can I build a program using c++ driver of mongodb?

Joyo Waseem
  • 680
  • 8
  • 25