在rh9.0编译ldd2中例子scull文件成功的帮忙看一下!
[root@localhost scull]# make
gcc -Wall -D__KERNEL__ -DMODULE -I/usr/src/linux/include -DMODVERSIONS -include
/usr/src/linux/include/linux/modversions.h -O2 -I.. -c -o main.o main.c
In file included from main.c:28:
/usr/src/linux/include/linux/malloc.h:4:2: #error linux/malloc.h is deprecated,
use linux/slab.h instead.
make: *** [main.o] Error 1
我的编译器是默认的gcc,例子是网上下的,kernel是2.4.8-20(ldd2中的例子也是以2.4为准的吧!)
编译别的例子,也会提示我
make:***[%.o] Error 1
错误相同,只是我make哪个,都提示我[.o]的文件有问题,怎么可能给的例子都有问题呢?
看来是我的环境有问题,有经验的帮忙看一下哈,谢谢~~