Re: Error in compiling a module

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

 



On Wed, Jul 28, 2010 at 11:51 PM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
>
> Hi...
>
> On Thu, Jul 29, 2010 at 00:28, Balachandar <bala1486@xxxxxxxxx> wrote:
> > Thank you for your help. I figured out the mistake. I missed a
> > semicolon in one of the header file that was included in the file that
> > showed the error.
>
> I think it would be great if you and some guys here write about
> "mistakes I ever did when I write kernel codes" in kernelnewbies
> wiki....so that others might learn about it.
>
> Just 2 cents suggestion...
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Hey think it is a really god idea to write about common mistakes in
kernel codes.  I have one , I realize  that when you just copy and
paste the code for the makefiles from the Internet or PDF's it doesn't
compile the first time, you have to eliminate some tabs spaces  first;
for example in the The Linux Kernel Module Programming Guide there is
a simple hello-1.c and its makefile is .

obj-m += hello-1.o
all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

when you run make in the terminal

make[1]: *** No rule to make target `-C'.  Stop.

Could appear

you have to copy in plain text or type yourself. well it is not a real
kenrel problem but mya help to others i realize it happens the first
time I compiled my "simplest module"

Thanks

Victor
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux