Xcode 11 is not loading <iostream> for c++

2

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

julietpg

Posted 2019-09-25T17:25:32.347

Reputation: 23

Answers

0

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.

jvb

Posted 2019-09-25T17:25:32.347

Reputation: 1 697

1Hi jvb, I was able to fix the problem by running $ xcode-select --install on terminal. Thanks! – julietpg – 2019-09-25T20:39:31.197

Aah, great! Thanks! :) – jvb – 2019-09-25T20:41:59.903

0

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

Pierre P Dufresne

Posted 2019-09-25T17:25:32.347

Reputation: 1