Messages in this thread | | | Subject | Small problem, Can anybody help me? | Date | Thu, 6 May 2004 19:31:56 +0530 | From | "Srinivas G." <> |
| |
Hi,
I have written a small hello.c program in the Linux Kernel version 2.4.18-3.
The code is as follows. -----------------------
define MODULE #include <linux/module.h> #include <linux/init.h>
MODULE_LICENSE("GPL");
int Test_init(void) { printk("<1> Hello World\n"); return 0; }
void Test_cleanup(void) { printk("<1> Good bye\n"); }
module_init(Test_init); module_exit(Test_cleanup);
I compiled it under same kernel version that is 2.4.18-3. It was showing the following errors.
In file included from hello.c:2: /usr/include/linux/module.h:60: parse error before `atomic_t' /usr/include/linux/module.h:60: warning: no semicolon at end of struct or union /usr/include/linux/module.h:60: warning: no semicolon at end of struct or union /usr/include/linux/module.h:62: parse error before `}' /usr/include/linux/module.h:62: warning: data definition has no type or storage class /usr/include/linux/module.h:91: parse error before `}'
The errors came due to a mistake in linux header file. Is it so...
Thanks in advance for any help you can come up with.
Regards,
Srinivas G
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |