Re: help needed- compilation issue

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

 



>
> make hello-1
> cc     hello-1.c   -o hello-1
> /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../crt1.o(.text+0x18): In
> function `_start':
> : undefined reference to `main'
> /tmp/cc0SuMYZ.o(.text+0xf): In function `module_init':
> hello-1.c: undefined reference to `printk'
> /tmp/cc0SuMYZ.o(.text+0x2c): In function `cleanup_module':
> hello-1.c: undefined reference to `printk'
> collect2: ld returned 1 exit status
> make: *** [hello-1] Error 1
>

With the Makefile I provided, you have to execute "make", instead of
"make hello-1". Also make sure you have installed the RPM
kernel-source. The command:

rpm -qa | grep kernel-source

Please refer to a good guide on writing Makefiles, and the latest
guide of Linux Kernel Module Programming guide for more details.

--
Goldwyn

--
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