我想为 ESP8266 编译一些 C 代码。我通过安装编译器
sudo apt install gcc-xtensa-lx106
当我尝试编译一个简单的foo.c
#include <stdint.h>
int main()
{
return 0;
}
使用
xtensa-lx106-elf-gcc foo.c
它报告以下错误:
In file included from foo.c:1:
/usr/lib/gcc/xtensa-lx106-elf/9.2.1/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
9 | # include_next <stdint.h>
| ^~~~~~~~~~
compilation terminated.
我想我需要为另一个标准库添加包含路径?!我如何让它编译?