[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] Problems with kernel modules



Here is the makefile that I used:
-----------------------------------------------------
CC=gcc
MODCFLAGS:= -Wall -D__KERNEL__ -DMODULE -DLINUX
hello.o:        hello.c /usr/include/linux/version.h
                $(CC) $(MODCFLAGS) -c hello.c
-----------------------------------------------------
I run RedHat 6.1. I have installed the Kernel-headers too. Is there
anything else that I have to Install ??


On Sat, 18 Dec 1999, Arun Sharma wrote:

> 
> On Sat, Dec 18, 1999 at 02:50:55PM +0530, Ghins Mathai wrote:
> > Hello
> > 
> > I was trying out some kernel module programming. I just keyed in the
> > hello.c  program from the Linux Kernel Module programming examples. When I
> > tried compiling it with
> > gcc -Wall -c hello.c 
> 
> You can't compile it that way. Certain symbols (KERNEL, MODULE etc)
> need to be defined. Use the makefile that came with the example.
> 
> 	-Arun
> 
> 
> --------------------------------------------------------------------
> The Linux India Mailing List Archives are now available.  Please search
> the archive at http://lists.linux-india.org/ before posting your question
> to avoid repetition and save bandwidth.
> 

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.