From mboxrd@z Thu Jan 1 00:00:00 1970 From: Victor Rodriguez Subject: Re: Error in compiling a module Date: Thu, 29 Jul 2010 08:56:31 -0500 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=mAtSvq2M9R7FVlhV5Cjg5vcpptQ1xJHKfQ5G3N2uQSg=; b=WbOdZUPZ28S/NuVCruZEchqAXfgdywyFt68AWkBacL4yHpz9Gqs8Qg8C1y7Itm2bWt 5nFHJCa6tpZxjedSWPSLThwvfI/XG9NSM7Yh0YUbrUwFxrlzebElBmDk9E1ezpbbGLCc 6IDLp+3g8SffzvM118ZpQZSFtu/PYMm38UEhU= In-Reply-To: Sender: linux-c-programming-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mulyadi Santosa Cc: Balachandar , kernelnewbies@nl.linux.org, linux-c-programming@vger.kernel.org On Wed, Jul 28, 2010 at 11:51 PM, Mulyadi Santosa wrote: > > Hi... > > On Thu, Jul 29, 2010 at 00:28, Balachandar 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@vger.kernel.org > 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