Mongodb Cxx驱动程序测试在发行版中崩溃[在调试中工作正常] [英] Mongodb Cxx Driver Test crashing in Release Build [ Works fine in Debug ]

查看:150
本文介绍了Mongodb Cxx驱动程序测试在发行版中崩溃[在调试中工作正常]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照这里.

我已经创建了步骤中提到的Test应用程序. 在发行版上,应用程序引发bad allocation异常: std::bad_alloc at memory location 0x0047EB60]在此行:

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 }; 

相同的代码可用于Debug构建.

The same code works with Debug build.

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

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

推荐答案

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

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.

这篇关于Mongodb Cxx驱动程序测试在发行版中崩溃[在调试中工作正常]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆