Re: kernel modules - big problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 03 July 2003 10:03, r2 wrote:
> I  tried out this module:-
>
> -----------hello.c--------------
> #include <linux/module.h>
>
> int init_module () {
> 	printk ("Hello World\n");
> 	return (0);
> }
>
> void cleanup_module () {
> 	}
>
> ------------hello.c-------------
>
> It gave me the following error when I insmoded the hello.o:-
>
> ?Could not find the kernel version this module was compiled for.?

You need to declare the preprocessor #define's __KERNEL__, MODULE and 
MODVERSIONS.

MS

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux