0

我按照此处描述的步骤在 Windows 中构建了 mongodb cxx 二进制文件。

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

mongocxx::uri muri{ uri_string }; 

相同的代码适用于 Debug 构建。

有人可以帮我解决 Release build 中的问题吗?

4

1 回答 1

3

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

于 2017-07-04T07:47:05.270 回答