Xcode 11 Is Not Loading for C++

Xcode 11 Is Not Loading for C++

I updated to Xcode 11 recently with iOS 10.15 (Public Beta 8) and when loading a previous cpp file with the header #include , Xcode sends me a warning saying 'iostream' file not found.

Screenshots attached. My type is Default - C++ Source. Xcode telling me that iostream file is not found

2 Answers

Sounds like you are specifying a SDK version which is not (or no longer) present. In that case, the first thing you will notice is lots of "missing" system headers.

Please check if your Xcode project settings are pointing to the correct SDK (probably macosx10.15 in your case). Same goes when working with Makefiles and using the -isysroot option.

2

I was able to fix this by changing:

Project -> Build Settings -> Apple Clang - Language - C++ -> C++ Standard Library -> Compiler Default

to:

Project -> Build Settings -> Apple Clang - Language - C++ -> C++ Standard Library -> libc++ (LLVM...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.