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

在這裏插入圖片描述

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