macos - Mojave 更新后出现“make”问题:致命错误:找不到“wchar.h”文件
问题描述
在我的 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 更新后遇到过这个问题,但可以通过..
但这一次没有任何效果。我已经重新安装了 xcode 10 和 xcode-selected 并且还切换到了新文件夹..
sudo xcode-select --switch /Library/Developer/CommandLineTools/
它仍在文件夹中搜索 wchar.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/
对此有任何想法!
解决方案
不确定它是否是一个通用的解决方案,但设置CPLUS_INCLUDE_PATH
为以下对我有用:
export CPLUS_INCLUDE_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
祝你好运!
推荐阅读
- java - 我想根据位置和打开和关闭时间使用 Firebase 适配器加载数据
- python - 在 process_response 上调用 request.session.save 时自定义会话中间件上的 Django 错误
- scala - Remove rows from Spark DataFrame that ONLY satisfy two conditions
- javascript - Slider Revolution 轮播覆盖单幻灯片过渡类型
- javascript - 在 Masterpage 中找不到“MainContentPlaceHolder”或在 ASP.NET 中返回 NULL
- pandas - 如果包含字符,则删除 Pandas DataFrame 行
- reactjs - 阻止 Google 自动填充用反应表单上的现有值覆盖字段
- ios - 在 Xcode 中的其他对象之间居中一组对象
- ruby - 删除/替换字符串中保留或无效的 url 字符
- google-bigquery - 如何将大查询表中的数据加载到其他数据库?(DB2)