linux编写模块遇到的问题,求大神解答。

所有的基本都是头文件找不到,请大神详细讲解下,具体怎么找头文件的?test.c:2:24:error:linux/init.h:没有那个文件或目录test.c:3:26:... 所有的基本都是头文件找不到,请大神详细讲解下,具体怎么找头文件的?

test.c:2:24: error: linux/init.h: 没有那个文件或目录
test.c:3:26: error: linux/module.h: 没有那个文件或目录
test.c:6:26: error: linux/skbuff.h: 没有那个文件或目录
In file included from test.c:7:
/usr/include/linux/netlink.h:34: error: expected specifier-qualifier-list before ‘sa_family_t’
In file included from /usr/include/linux/signal.h:4,
from test.c:14:
/usr/include/asm/signal.h:135: error: expected specifier-qualifier-list before ‘size_t’
test.c:19:24: error: linux/file.h: 没有那个文件或目录
test.c:20:25: error: linux/mount.h: 没有那个文件或目录
test.c:21:25: error: linux/namei.h: 没有那个文件或目录
test.c:22:26: error: linux/dcache.h: 没有那个文件或目录
test.c:23:28: error: linux/syscalls.h: 没有那个文件或目录
test.c:26:28: error: linux/security.h: 没有那个文件或目录
test.c:27:31: error: linux/moduleparam.h: 没有那个文件或目录
In file included from test.c:30:
/usr/include/linux/in.h:188: error: expected specifier-qualifiam
展开
 我来答
不去上0V
2012-04-09
知道答主
回答量:4
采纳率:0%
帮助的人:5.5万
展开全部
有可能是Makefile有问题的哦。检查下吧。用的头文件都是内核的头文件。
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
107080285
2012-04-12 · TA获得超过1114个赞
知道小有建树答主
回答量:390
采纳率:50%
帮助的人:157万
展开全部
你在那个目录下编辑的? 你确定进入了linux内核目录下再gcc!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
欲將心事付瑶琴
2012-04-08 · TA获得超过335个赞
知道小有建树答主
回答量:158
采纳率:0%
帮助的人:217万
展开全部
你是为PC编写模块还是从事嵌入式开发?还有你编写模块时Makefile文件的内容是什么?执行的什么命令?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
fastfixer
2012-04-08
知道答主
回答量:3
采纳率:0%
帮助的人:4763
展开全部
代码能贴详细一点吗?你编的是什么模块?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式