Skip to main content
 首页 » 编程设计

xcode之macOS 'wchar.h' 找不到文件

2024年04月18日49dyllove98

在 OS X 10.9.5 下使用 XCode 6.0.1 当我尝试从终端运行 make 时遇到以下问题:

fatal error: 'wchar.h' file not found 

在最近升级到 Mavericks 之前,不会发生此问题。

请您参考如下方法:

首先确保安装了最新的 XCode。接下来,我们需要安装/修复/更新命令行工具。为此,请运行

xcode-select --install 

以前,XCode 预计其事件开发人员目录位于

/Applications/Xcode.app/Contents/Developer/ 

但是安装了最新的命令行工具

/Library/Developer/CommandLineTools/ 

所以我们需要切换 XCode 正在寻找的位置。为此,请运行

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

应该就是这样。这些步骤为我自己和两个同事解决了这个问题。