I just attempted to build mongo-cxx-driver with VS2022. All seems to go well, but the installed .DLL’s have very strange names. Here’s my history:
curl -OL https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.11.0/mongo-cxx-driver-r3.11.0.tar.gz
tar -xf mongo-cxx-driver-r3.11.0.tar.gz
cd mongo-cxx-driver-r3.11.0
cd build/
cmake … -DCMAKE_INSTALL_PREFIX=c:/packages/vs2022/libmongo-cxx-driver -DMONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX=OFF -DBUILD_SHARED_AND_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=OFF -DCMAKE_CXX_STANDARD=20
cmake --build . --parallel
cmake --build . --target install
This all seems to work fine. However, the names of the .DLL and .lib files for the “cxx” libraries are not as expected, resulting in link errors when I attempt to use it to build my application. Is this behavior expected?
/c/packages/vs2022/libmongo-cxx-driver/bin:
bson-1.0.dll* concrt140.dll* mongocxx-v_noabi-dhs-x64-v143-mdd.dll* msvcp140_1.dll* msvcp140_atomic_wait.dll* vcruntime140.dll*
bsoncxx-v_noabi-dhs-x64-v143-mdd.dll* mongoc-1.0.dll msvcp140.dll* msvcp140_2.dll* msvcp140_codecvt_ids.dll* vcruntime140_1.dll*
/c/packages/vs2022/libmongo-cxx-driver/include:
bsoncxx/ libbson-1.0/ libmongoc-1.0/ mongocxx/
/c/packages/vs2022/libmongo-cxx-driver/lib:
bson-1.0.lib bsoncxx-static-dhs-x64-v143-mdd.lib cmake/ mongoc-static-1.0.lib mongocxx-v_noabi-dhs-x64-v143-mdd.lib
bson-static-1.0.lib bsoncxx-v_noabi-dhs-x64-v143-mdd.lib mongoc-1.0.lib mongocxx-static-dhs-x64-v143-mdd.lib pkgconfig/
/c/packages/vs2022/libmongo-cxx-driver/share:
mongo-c-driver/ mongo-cxx-driver/
`