lkml.org 
[lkml]   [2004]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectProblems compiling kernel modules
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.074 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site