更新Mojave之后,从终端运行“ make”时出现错误:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
文件wchar.h位于该目录中,但找不到。
在较早的Macos更新之后,我曾遇到过此问题,但可以通过解决此问题。
macOS 'wchar.h' File Not Found
但是这次没有任何效果。我已经重新安装了xcode 10并选择了xcode,并且还用..切换到了新文件夹。
sudo xcode-select --switch /Library/Developer/CommandLineTools/
它仍在文件夹
中搜索wchar.h/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c ++ / v1 /
对此有任何想法!
答案 0 :(得分:8)
不确定这是否是通用解决方案,但是将CPLUS_INCLUDE_PATH
设置为以下内容对我来说是成功的秘诀:
export CPLUS_INCLUDE_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
祝你好运!