我正在尝试构建一个独立的Android内核,并且我想编写可加载的内核模块,但是当我构建我的module.c文件时,我遇到了这个错误
error: smd_private.h: No such file or directory谷歌搜索告诉我,我应该将<smd_private.h>更改为"smd_private.h" .but,错误仍然存在!!你能帮帮我吗?
发布于 2016-06-03 01:55:33
检查以确保smd_private.h与我的module.c在同一目录中。
以下是来自https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html#Include-Syntax的信息
2.1 Include Syntax
Both user and system header files are included using the preprocessing
directive ‘#include’. It has two variants:
#include <file>
This variant is used for system header files. It searches for a file
named file in a standard list of system directories. You can prepend
directories to this list with the -I option (see Invocation).
#include "file"
This variant is used for header files of your own program. It searches
for a file named file first in the directory containing the current
file, then in the quote directories and then the same directories used
for <file>. You can prepend directories to the list of quote directories
with the -iquote option.
The argument of ‘#include’, whether delimited with quote marks or angle
brackets, behaves like a string constant in that comments are not
recognized, and macro names are not expanded. Thus, #include <x/*y>
specifies inclusion of a system header file named x/*y.
However, if backslashes occur within file, they are considered ordinary
text characters, not escape characters. None of the character escape
sequences appropriate to string constants in C are processed.
Thus, #include "x\n\\y" specifies a filename containing three
backslashes. (Some systems interpret ‘\’ as a pathname separator.
All of these also interpret ‘/’ the same way. It is most portable to
use only ‘/’.)
It is an error if there is anything (other than comments) on the line
after the file name.https://stackoverflow.com/questions/35423290
复制相似问题