views:

1003

answers:

2

Hello, 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/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
+9  A: 

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.

KennyTM
+1 for file bug :)
chrispy
adding this path will only fix device builds.
zooropa
+6  A: 

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).

bvanderveen