gpt4 book ai didi

ios - 使用 c++11 代码构建 Cocoa touch 框架

转载 作者:行者123 更新时间:2023-11-29 12:29:53 26 4
gpt4 key购买 nike

我正在尝试制作一个 iOS 框架。我的代码包括 c++11 特性。当我构建框架目标时,出现如下错误:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:56:9: 全局命名空间中没有名为“clock_t”的成员

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:58:9:全局命名空间中没有名为“time_t”的成员;您是说“size_t”吗?

我该如何解决这个问题?谢谢。

更新:

这是我的 Apple LLVM 6.0 - Language-c++ 设置: enter image description here

使用该 c++11 代码编译的常规 iOS 项目没有错误。

最佳答案

您需要在常规选项卡下显式添加 libc++ 作为链接库。

enter image description here

关于ios - 使用 c++11 代码构建 Cocoa touch 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28041965/

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