Mongoc-1.0 thowing exception from installation guide

I literally never make forum posts… but the inconsistency with install procedures regarding c++ driver is throwing me through loops.

My issue is that I am getting bad memory reads regarding URI when following the tutorial.

Current implementation is the guide off of 4.0 driver documentation, installed the c++ driver using vcpkg so all files are inside C:/mongo-cxx-driver. I’ve linked the dependencies and headers shown in getting started tutorial (from 1.23.0/3.7 guide), renaming the path accordlingly.

I’m decently familiar with mongo in other code bases, but I’m fairly new to c++, so much that I am unable to root out this issue.

I’m using visual studio 2022 with msvc on windows 11. I’ve tried to also use GCC, but I’m not familiar enough with include methodology to successfully use the command shown in getting started of 4.0 c++ page.

Thanks

Have you executed vcpkg integrate install to integrate the installation with Visual Studio?

Also, can you double check you are not mixing release and debug configurations?

After hours of flattening my face against the wall, its come to my attention that changing the build from debug to release rectified this problem.

1 Like