Matt Dalen wrote:

>I've been trying to compile a simple module, but I've been having
>trouble with GCC.  I input:
>
>gcc -c hello.c
>insmod hello.o
>
>and it outputs an error message, saying that hello.o was compiled for
>kernel version 2.4.18, and that I'm using kernel version 2.4.18-6mdk.
>Does anyone know how to compile for kernel version 2.4.18-6mdk?  I've
>tried getting the latest version of gcc from MandrakeUpdate, but that
>doesn't seem to change anything.  Thanks!
>
>Matt Dalen
>
>
>
>------------------------------------------------------------------------
>
>Want to buy your Pack or Services from MandrakeSoft? 
>Go to http://www.mandrakestore.com
>
insmod is used for loading kernel modules.  That means you need to be in 
root mode and logged to /usr/src/linux and

make mrproper
make deps
make modules install

(and of course hello.c would have to be added to the kernel modules 
source code and appropriate headers added.)

Do not do this...  Hello.c does not have to be part of the kernel.

Use the linker to make an executable from hello.o and then run it.

Civileme



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to