Whenever I try to use Xcode 11 to build C++ programs and type in the line:
#include <iostream>
An error saying "'iostream' file not found shows up. The library I am using is libc++ and not libstdc++.
Other people dont seem to encounter this problem so I do not know what is going on.
#include <iostream>
using namespace std;
int main()
{
cout << "Hey, this really works!" << endl;
}
We encountered the same problem while using a C++ class with Objective-C wrapper.
While checking the build command we found Xcode was passing objective-c as the language for clang. On changing the Wrapper file extension to '.mm', XCode started passing language as objective-c++ and the error was gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With