xcode升级后找不到 C语言头文件 stdio.h的解决办法

问题引出

每次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

在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章