[에러메세지] hello 모듈시...

익명 사용자의 이미지


[root@localhost root]# gcc -D_LERNEL_ -I/usr/src/linux/include -
Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -
fno-strict-aliasing -fno-common -pipe -march=i386 -DMODULE -c -
o$(pwd)/hello_2.o $(pwd)/hello_2.c

//에러 메세지...
/root/hello_2.c In function `init_module'
/root/hello_2.c4 warning implicit declaration of function `printk'

해서 컴파일을 했는데 ...위와 같은 에러가 났습니다........
어떻게 해결 할 수 있는지 말씀해 주시면 감사하겠습니다...
아래는 소스입니다...
그럼 수고하십시오...

#define MODULE
#include
MODULE_LICENSE("GLP"); //소스 마지막에 넣으면 에러가 뜹니다...
int init_module(void){ printk("<1>Hello, world\n");
return 0;}
void cleanup_module(void){ printk("<1>Goodbye!!!\n");}

익명 사용자의 이미지

linux/kernel.h 화일을 include 시키는것을 빠뜨리셨네요.

익명 사용자의 이미지

kernel.h를 추가해 봤는데 아무런 변화가 없이 에러가 똑같이 뜹니다...

무엇이 문제일 까요????