For some reason I am now unable to compile even a simple hello world, in my mac, using g++ (or clang++ or anything fwiw).
The last thing I recall I did was install llvm through homebrew.
Using g++ -isysroot /Applications/Xcode.app/Contents/Developer/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk main.cpp seem to work, but I used to be able to just use g++ main.cpp
This is an extract of the output from g++ main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
In file included from main.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:90:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:133:77: error:
use of undeclared identifier 'wcschr'wchar_t* __libcpp_wcschr(constwchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:140:87: error:
use of undeclared identifier 'wcspbrk'wchar_t* __libcpp_wcspbrk(constwchar_t* __s1, constwchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:147:78: error:
use of undeclared identifier 'wcsrchr'; did you mean 'wcschr'?
wchar_t* __libcpp_wcsrchr(constwchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
....
....
Because... just renaming your entire system include directory does not sound like a safe and sensible thing to do, and certainly not good advice to be giving other people.