public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problems compiling kernel modules
@ 2004-08-21 19:24 Lei Yang
  2004-08-21 21:44 ` Sam Ravnborg
  0 siblings, 1 reply; 21+ messages in thread
From: Lei Yang @ 2004-08-21 19:24 UTC (permalink / raw)
  To: Kernel Newbies Mailing List, linux-kernel

Hi all,

I was trying to compile a kernel module with kbuild. The module 'test.c' 
include a header file 'fred.h' and there is a "#include <stdio.h>" in 
'fred.h'.

Makefile looks like:

------------------------------------------------------------------------
ifneq ($(KERNELRELEASE),)
obj-m       := test.o

else
KDIR        := /usr/src/linux
PWD         := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
	

clean:
	rm -f *.o *.ko *.mod.c *.mod.o \
	.test.o.cmd .test.ko.cmd .test.mod.o.cmd
	rm -rf .tmp_versions
endif

-------------------------------------------------------------------------
But upon compiling, there would be errors like this:
In file included from /home/lei/test.c:49:
/home/lei/fred.h:4:19: stdio.h: No such file or directory

and a lot of undeclared names follow which I assume is from stdio.h.

Could anyone point out what's wrong here?

TIA!

Lei

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-08-23 17:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-21 19:24 Problems compiling kernel modules Lei Yang
2004-08-21 21:44 ` Sam Ravnborg
2004-08-21 19:45   ` Lei Yang
2004-08-21 20:05     ` viro
2004-08-21 20:13     ` Lee Revell
2004-08-21 21:50     ` Sam Ravnborg
2004-08-21 19:55       ` Lei Yang
2004-08-21 20:46       ` Lei Yang
2004-08-21 20:57         ` Lee Revell
2004-08-23 14:10           ` Lei Yang
2004-08-23 14:29             ` Richard B. Johnson
2004-08-23 14:39               ` Lei Yang
2004-08-23 14:52                 ` Richard B. Johnson
2004-08-23 15:04                   ` Lei Yang
2004-08-23 15:20                     ` Richard B. Johnson
2004-08-23 15:25                     ` Sam Ravnborg
2004-08-23 15:44                       ` Lei Yang
2004-08-23 16:21                         ` Alan Cox
2004-08-23 14:52                 ` Alan Cox
2004-08-23 15:48               ` Andreas Schwab
2004-08-21 21:11         ` Alex Goddard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox