Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: iOS 中的联锁操作?
如何在 iOS 中使用 std::atomic?
我收到错误时 #include <atomic>
#include <atomic>
或者我应该包括什么?或者有其他选择吗?
谢谢。
编辑:用法在 .cpp 文件中,但在 iOS 项目中。
将您的 .m 文件编译为 objc++ - 最简单的方法:将它们重命名为 .mm
还可以在您的项目设置 > 构建阶段 > 与框架链接下链接 libstdc++