I recently bought a new MacBook on which I transferred my old session. Since then, and after i upgraded to 10.13, i can\'t get clang to compile anything including only iostr
I had exactly the same problem after transferring to macOS High Sierra (though, errors were not the same, but similar).
I found a workaround by renaming /usr/local/include
to /usr/local/include_old
(well, name does not really matter, just the fact that g++/clang
will not search for headers in this folder anymore).
I had a similar issue that after upgrading to high sierra (and Xcode 9.1) that my standard make reported unfamiliar warnings.
It drew .h files from /usr/local/include
instead from the (as I thought) standard /usr/include
. For example, there was no zlib.h
available.
Reinstalling Xcode (who claims to install the commandline version too) did not help.
There was no /usr/include
at all but the C++ system include were available through the links reported in clang --version
, but none of the C-includes.
After xcode-select --install
and actually "install" of the commandline material the /usr/include
was populated with the necessary C libraries, and make started to compile without warnings again.
I had exactly the same problem today and after executing xcode-select --install
, everything works fine!
Check that you don't include "/usr/local/include" into headers search path of your project.
I had the same issue after upgrading to MacOS Mojave 10.14.4 and Xcode 10.2
The issue got resolved, after installing the package /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg