Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After Mojave update problems with "make": fatal error: 'wchar.h' file not found

After my Mojave update I get an error when runing "make" from the terminal:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found

The file wchar.h IS located in that directory but cant be found.

I had this problem once after an earlier Macos update but it could be solved with..

macOS 'wchar.h' File Not Found

But this time nothing works. I already reinstalled xcode 10 and xcode-selected and also switched to the new folder with..

sudo xcode-select --switch /Library/Developer/CommandLineTools/

It is still searching for wchar.h in the folder

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/

Any Ideas for this!!

like image 893
E E Avatar asked Oct 05 '18 07:10

E E


1 Answers

Not sure whether it's a universal solution, but setting CPLUS_INCLUDE_PATH to the following did the trick for me:

export CPLUS_INCLUDE_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"

Good luck!

like image 162
Jenny Avatar answered Nov 19 '22 10:11

Jenny