Linux kernel 内核编程-生成文件错误

Linux kernel 内核编程-生成文件错误,linux-kernel,Linux Kernel,我没有得到这个代码的输出。在我的Makefile中需要做哪些更改?? 代码: 错误: /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: error: ‘mybyte’ undeclared (first use in this function) /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: note: each undeclared identifier

我没有得到这个代码的输出。在我的Makefile中需要做哪些更改?? 代码:

错误:

 /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: error: ‘mybyte’ undeclared     (first       use in this function)
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: note: each undeclared identifier is reported only once for each function it appears in
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:24:28: error: ‘myint’ undeclared (first use in this function)
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
尝试更改:

MODULE_PARM(mybyte, "b");
MODULE_PARM(myint, "i");
static int (myint='i');
static u8 (mybyte='A');
致:


你认为问题出在你的编译器上吗?!!!。问题是您的程序,至少在这里正确粘贴程序,您的程序中是否有函数“hell05_init”,或者您的程序中是否有函数“helo5_exit”,是否有方法定义这样的变量“static u8(mybyte='a')?。
 /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: error: ‘mybyte’ undeclared     (first       use in this function)
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:23:24: note: each undeclared identifier is reported only once for each function it appears in
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:24:28: error: ‘myint’ undeclared (first use in this function)
    /home/kumarmagi/Desktop/amit/hello5/hello5.c:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
MODULE_PARM(mybyte, "b");
MODULE_PARM(myint, "i");
static int (myint='i');
static u8 (mybyte='A');
module_param(mybyte, short, 0660);
module_param(myint, int, 0660);
static short mybyte='A';
static int myint='i';