Mongodb Cxx Driver Test crashing in Release Build [ Works fine in Debug ]

对着背影说爱祢 提交于 2020-01-17 07:25:11

问题


I have build the mongodb cxx binaries in windows following the steps described here.

I have created the Test application as mentioned in the steps. On release builds, the application throws bad allocation exception: std::bad_alloc at memory location 0x0047EB60] in this line :

mongocxx::uri muri{ uri_string }; 

The same code works with Debug build.

Could someone please help me to fix the issue in Release build ?


回答1:


My issue got resolved after I built mongocxx and bsoncxx in Release and used that. Previously I built those in Debug and Test Application in release. Need to match the target configuration.



来源:https://stackoverflow.com/questions/44884079/mongodb-cxx-driver-test-crashing-in-release-build-works-fine-in-debug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!