我正在尝试将一些 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/