开发者

C++ compilation for iPhone (STL issue?)

I am trying to compile some C++ code as a static library to use on the iPhone. If I compile things for the simulator (i386 architecture), everything compiles just peachy, but when I switch the architecture to arm, I get all these include errors, seemingly within the iPhone SDK STL headers. Any idea what's going on?

First of the errors:

/Developer/Platf开发者_StackOverflow社区orms/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


Add /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9/ as the include path.

Also, please file a bug to Apple.


To fix this bug for all SDK versions, add

$(SDKROOT)/usr/include/c++/4.2.1/armv6-apple-darwin9

to the "Header Search Paths" build setting (the architecture shouldn't matter; this still works for the simulator for me).


There are no armv6-apple-darwin9 subdirectory

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜