找不到 macOS 'wchar.h' 文件 [英] macOS 'wchar.h' File Not Found
问题描述
在使用 XCode 6.0.1 的 OS X 10.9.5 下,当我尝试从终端运行 make
时遇到以下问题:
Under OS X 10.9.5 using XCode 6.0.1 I am running into the following issue when I try to run make
from the terminal:
fatal error: 'wchar.h' file not found
这个问题在最近升级到 Mavericks 之前没有发生.
This issue was not happening prior to a recent upgrade to Mavericks.
推荐答案
首先确保安装了最新的 XCode.接下来,我们需要安装/修复/更新命令行工具.为此,运行
First ensure that the latest XCode is installed. Next, we need to install/fix/update Command Line Tools. To do so, run
xcode-select --install
以前,XCode 期望它的活动开发者目录位于
Previously, XCode expected it's active developer directory to be located at
/Applications/Xcode.app/Contents/Developer/
但安装了最新的命令行工具
but the latest Command Line Tools is installed to
/Library/Developer/CommandLineTools/
所以我们需要切换 XCode 的位置.为此,运行
so we need to switch where XCode is looking. To do so, run
sudo xcode-select --switch /Library/Developer/CommandLineTools/
应该就是这样.这些步骤为我自己和两个同事解决了这个问题.
And that should be it. These steps solved the issue for myself and two coworkers.
这篇关于找不到 macOS 'wchar.h' 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!