Re: linux/module.h does not exist

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

 



Apart from what you said I notice adding /linux to reduces the errors.
So when I tried

gcc -I /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/ -I
/usr/src/linux-headers-2.6.28-11/include/linux/ -c sample2.c
got less errors

sample2.c:3:26: error: linux/module.h: No such file or directory
sample2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘int’
sample2.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘int’
sample2.c: In function ‘init_module’:
sample2.c:14: error: ‘main_sys_exit’ undeclared (first use in this function)
sample2.c:14: error: (Each undeclared identifier is reported only once
sample2.c:14: error: for each function it appears in.)
sample2.c:15: error: ‘alt_exit_function’ undeclared (first use in this function)
sample2.c: In function ‘cleanup_module’:
sample2.c:19: error: ‘main_sys_exit’ undeclared (first use in this function)

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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