I am trying to follow this guide, and I am currently at step 3.
So after running,
curl -OL https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.1.tar.gz
tar -xzf r3.0.1.tar.gz
cd mongo-cxx-driver-r3.0.1/
I try to do similar commands as in the Windows guide for mongoc:
If I do just
cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/mongo-cxx-driver"
I get an error
CMake Error at cmake/FindLibBSON.cmake:37 (message):
Don't know how to find libbson; please set LIBBSON_DIR to the prefix
directory with which libbson was configured.
Call Stack (most recent call first):
src/bsoncxx/CMakeLists.txt:67 (find_package)
So here I have tried different things, like adding the paths to the libsson directory:
cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/mongo-cxx-driver" "-DLIBBSON_DIR=C:/mongo-c-driver/lib/pkgconfig/" "-DLIBMONGOC_DIR=C:/mongo-c-driver/lib/pkgconfig/" "-DBOOST_ROOT=C:/local/boost_1_62_0/"
This actually works, but then when I try to build with
msbuild.exe ALL_BUILD.vcxproj
I get an error:
C:\Users\Erik\Documents\mongo-cxx-driver-r3.0.1\src\bsoncxx\array\view.cpp(21): fatal error C1083: Cannot open include
file: 'bson.h': No such file or directory [C:\Users\Erik\Documents\mongocxx-driver-r3.0.1\src\bsoncxx\bsoncxx_static.v
cxproj]
This file, "bson.h" seems to reside in the direcroty
C:\mongo-c-driver\include\libbson-1.0
but I am not sure why it does not find the file or how I could make it do so.
Greatly appreciate any input on this.