Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:11:13+00:00 2026-06-03T03:11:13+00:00

I have a objective c/c++ project under iOS, moving it from OS/X and I

  • 0

I have a objective c/c++ project under iOS, moving it from OS/X and I get a ‘file not found’ error on

#include <string>

It’s a clean project, and I’ve just added the files from the old project. Are the STL includes set up in XCode? A find produces a number of possibilities e.g.

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

but adding this to the search path just threw up more errors. Any suggestions?
(apart from don’t use string – it’s in house code I’m porting)

xcode 4.2.1, ios5.0 running on OS/X 10.7.3 and it’s in a .cpp file, the code works fine on OS/X

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:11:15+00:00Added an answer on June 3, 2026 at 3:11 am

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

    I just tested on a fresh project, by adding a .cpp file and including <string>, and it works, just as expected (same Xcode version, same SDK version).

    But if I include <string> in a .m file, then of course I got a «file not found» compiler error.

    So double-check this, as the error may come from here.

    Do you include <string> from a .cpp file only, or from a .h file, intended to be used by a .cpp implementation?
    Then maybe it’s also included by a .m file, hence the error.

    Also check your precompiled headers, if any, to see if you include some C++ stuff there…

    Also remember, in that later case, that you can rely on the __cplusplus macro, when needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my objective-c project, I have a protocol like this: @protocol MyProtocol -(id) get:(NSString
In Objective-C xcode project I have a plist file with which associates integers with
I have this Objective-C code that I found somewhere. Honestly, I don't understand a
I have been using objective-C to develop in iOS. Now we want to develop
I have an Objective-C/Cocoa project that incorporates a static library. That static library has
In my Objective-C project I have a Country class (NSManagedObject subclass). When comparing a
I have an xcode Objective-C iPhone static library project. When I build it in
I have an iPhone project (Xcode, Objective C++) with two targets - A and
I have a pure Objective-C project (no C++ anywhere). Can I turn off GCC_ENABLE_CPP_EXCEPTIONS
I have some synchronization in my Objective-C project. The code looks like this: -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.