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