Hinko Kocevar wrote:
Hi,
I'm reading LDD2 and trying to compile sample code as I go along,
unfortunately I stumbled on some errors at the very first hello.c
module. I'm running suse9, with latest kernel and sources installed
(2.4.21-231).
Compiling with: gcc -c hello.c
-- alot of errors --
It looks like using
gcc -c hello.c \
-D__KERNEL__ \
-I/lib/modules/`uname -r`/build/include
solves the problem ...
I wonder why this is not mentioned in LDD2 ? Has module compilation
changed ?
--
hinko<dot>kocevar<at>
iskramedical<dot>si
Hinko Kocevar, developer "AÃ rÃn"
Iskra Medical d.o.o. [Analects XII:22]
Stegne 23, 1k LJ, SLO-EU
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/