我将运行一个使用 #include <linux/bootmem.h>
的代码在代码中。当我在 Linux 中运行代码时,出现错误
“fatal error: linux/bootmem.h: No such file or directory
#include <linux/bootmem.h>”
我怎样才能找到那个文件?我搜索了一下,没找到。
如果找到该文件,我该如何使用它?将文件放在同一目录中是否足够?
最佳答案
是this你在找什么?如果是这样,你可以将它保存在一个头文件中,比如 bootmem.h 并将它与你的源代码放在一起。然后使用以下预处理器指令:
#include "bootmem.h"
当您从系统库中包含头文件时,您使用“< >”括号,当您从本地文件夹中包含头文件时,您应该使用双引号。
关于c - 如何获取 <linux/bootmem.h> 文件并修复错误 "fatal error: linux/bootmem.h: No such file or directory #include <linux/bootmem.h>"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57828819/