#include <string> file not found in iOS in C ++ file

I have a c / C ++ object project under iOS, moving it from OS / X, and I get a "file not found" error on

#include <string>

This is a clean project, and I just added files from an old project. Are STLs included in Xcode? The find provides a number of possibilities, for example

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/debug/

but adding this to the search path just generated more errors. Any suggestions? (besides not using a string - this is the house code that I carry)

xcode 4.2.1, ios5.0 works on OS / X 10.7.3 and in the .cpp file, the code works fine on OS / X

+5
source share
2 answers

Are you really sure that it is <string>included only from a .cpp file?

, .cpp <string>, , ( Xcode, SDK).

<string> .m , , , " ".

, , .

<string> .cpp .h, .cpp?
, , .m, , .

, , , ++ ...

, __cplusplus, .

+15

ObjC <string>, . .m XCode C (clang llvm-gcc). .mm (clang++ llvm-g++).

.m .mm. main.m to main.mm.

+9

All Articles