macOS配置Clion用于STM32开发找不到stdint.h等头文件问题解决方案
问题
编译报错发现是arm-none-eabi-gcc
版本低于11
[1],于是通过brew
升级
升级后编译工程时出现大量类似错误如下
/opt/homebrew/Cellar/arm-none-eabi-gcc/13.2.0/lib/gcc/arm-none-eabi/13.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
问题原因
不能使用brew install arm-none-eabi-gcc
安装编译工具链[2]
解决方案
打开终端输入命令[3]
brew uninstall arm-none-eabi-gcc
brew autoremove
brew install --cask gcc-arm-embedded