[英]Compilation error: “stdint.h: No such file or directory”
when trying to build kernel尝试构建内核时
I got this error我收到这个错误
/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h:9:26: error: no include path in which to search for stdint.h
# include_next <stdint.h>
when i looked in /usr/lib/gcc/x86_64-linux-gnu/7/当我查看 /usr/lib/gcc/x86_64-linux-gnu/7/
there is just one stdint.h and under include-fixed dir there are : limit.h and syslimit.h只有一个 stdint.h 并且在包含固定目录下有:limit.h 和 syslimit.h
At the end,在末尾,
i resolved the problem by adding to KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
我通过添加到KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
解决了这个问题
That restricts gcc use standard stdint stdint-gcc.h
这限制了 gcc 使用标准 stdint stdint-gcc.h
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.