名称空间"std"中没有名为"shared_ptr"的类型 [英] no type named 'shared_ptr' in namespace 'std'

查看:1342
本文介绍了名称空间"std"中没有名为"shared_ptr"的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望这对其他人有帮助

尝试使用Cedar BDD编译iOS项目失败,并在名称空间"std"错误消息中没有名为"shared_ptr"的类型. 显然这是一个C ++错误,但无法理解为什么Xcode使用的C ++库没有定义;直到我发现目标的构建设置提供了两个库可供选择,才定义了shared_ptr类型

Trying to compile an iOS project with Cedar BDD kept failing with no type named 'shared_ptr' in namespace 'std' error message. It was obviously a C++ error but couldn't understand why the C++ library Xcode was using didn;t have the shared_ptr type defined until I discovered the build settings of the target provides two libraries to choose from

  • libstdc ++(默认编译器)
  • libc ++

推荐答案

选择libc ++可以解决此问题,请参见屏幕截图

selecting libc++ fixes the problem see screenshot

这篇关于名称空间"std"中没有名为"shared_ptr"的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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