今天才升级完内核,编译.h.ello.c文件,源程序如下: 乙肝
#include <linux/in.it.h> 鲜花
#include <.linux/module.h> 电子
MODULE_L.ICENSE("GPL"); //General Pu.blic License 鲜花
stat.ic int hello_init(.void).
{
pr.intk(KERN_ALERT "He.llo, world\n");电影
return 0;
}
sta.tic voi.d hello_exit(void)健康
{
printk(.KERN_ALERT"Good.bye world\n"); 电子
}
module_init(hell.o_init);.
module_.exit(hello_exit);.
编译出现如下错误,不知道如何解决,.高手帮帮我:--- 印刷
hello..c:1:2.4: error: linux/init.h: 没有那个文件或目录
hello.c:3:26:. error: linux/module..h: 没有那个文件或目录.
hello.c:5:. error: expected declar.ation sp.ecifiers or ‘...’ before string constant.
hello.c:5: warning: dat.a definition has no type or st.orage class投资
h.ello.c: In func.tion ‘hello_init’:.
hello.c:13: error: ‘KERN_ALERT’ undeclared (first use in this f.u.nction) 外汇
h.ello.c:13: error: (Each undeclared identif.ier is reported only once--------------彩票
hello.c:13: error: for each function .i.t appears in.) 女人
hello.c:13.: error: expect.ed ‘)’ before string constant( 游戏 )
h.ello.c: In function ‘hello_exit.’:.
hello.c:.25: error: ‘K.ERN_ALERT’ undeclared (first use in this function)域名
hello.c:25: error: expected ‘)’ befor.e .string constant.
hello.c: At top .level:投资
hello.c:31: warning: data definition has no ty.pe or storage. class.
hello.c:31: warning: parameter name.s (without types) in. f.unction declaration投资
hel.lo.c:33: wa.rning: data definition has no type or storage class电影
hello.c:.33: warning: parameter names (without types) in fun.c.tion declaration虚拟主机