iPhone 的 C++ 编译(STL 问题?)

标签 c++ iphone xcode stl compilation

我正在尝试将一些 C++ 代码编译为静态库以在 iPhone 上使用。如果我为模拟器(i386 架构)编译东西,一切都编译得很好,但是当我将架构切换到 arm 时,我得到所有这些包含错误,似乎在 iPhone SDK STL header 中。知道发生了什么事吗?

第一个错误:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/string:45:0 Bits/c++config.h: No such file or directory in 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/string

最佳答案

添加/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9/作为包含路径.

另外,请向 Apple 提交错误。

关于iPhone 的 C++ 编译(STL 问题?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2160187/

相关文章:

ios - 在 Xcode 项目清理构建文件夹后,Images.xcassets 停止工作 - iOS

ios - iPad TCP 连接套接字超时(代码 60)

c++ - 使用模板和可变参数模板进行线程初始化

iphone - NSString 值在 -(id)init 之后更改

iphone - 如何从 url 加载图像到 UITableViewCell?

Xcode:下载mp3文件

c++ - g++ 4.2 SSE 指令的内联汇编用对齐的 XMM 寄存器拷贝包装用户汇编代码

c++ - g++ "calling"一个没有括号的函数(不是 f() 而是 f; )。为什么总是返回 1?

c++ - 无法解决 Segmentation Fault 核心转储错误

iphone - 如何使用 AVAudioRecorder 暂停和恢复录音