問題引出
每次xcode10版本更新後,在做C/C++開發時,經常會發現之前的代碼編譯出現了問題,提示
fatal error: 'stdio.h' file not found
解決辦法
方法1
安裝命令行工具,在終端下執行
xcode-select --install
如果出現如下信息,請用方法2
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
方法2
cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg