mac fatal error: 'stdlib.h' file not found
//1.检查头文件是否存在 $clang++ -E -x c++ - -v < /dev/null ignoring nonexistent directory "/usr/include/c++/v1" ignoring nonexistent directory "/usr/include" 注:说明macOS SDK 的头文件不存在 //2.安装xcode-select $xcode-select --install //3.获取header pkg $xcode-select -p //4.查看config $brew config //5.安装头文件 $ cd /Library/Developer/CommandLineTools/Packages/ $ open macOS_SDK_headers_for_macOS_10.14.pkg 来源: oschina 链接: https://my.oschina.net/u/2832792/blog/3035896