Mongodb Cxx Driver Test 在 Release Build 中崩溃 [在 Debug 中工作正常]

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

我已经按照 here 中描述的步骤在 windows 中构建了 mongodb cxx 二进制文件。

我已经按照步骤中的说明创建了测试应用程序。 在 发布版本 上,应用程序抛出 bad allocation 异常: std::bad_alloc at memory location 0x0047EB60] 在这一行中:

mongocxx::uri muri{ uri_string }; 

相同的代码适用于调试版本。

有人可以帮我解决发布版本中的问题吗?

在 Release 中构建 mongocxx 和 bsoncxx 并使用它们后,我的问题得到了解决。以前我在发布时在调试和测试应用程序中构建了那些。 需要匹配目标配置。