gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 01:46:24 26 4
gpt4 key购买 nike

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

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

mongocxx::uri muri{ uri_string }; 

相同的代码适用于调试构建。

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

最佳答案

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

关于c++ - Mongodb Cxx Driver Test 在 Release Build 中崩溃 [在 Debug 中工作正常],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44884079/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com