|
编译时碰到样的情况:
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: #error to build against the currently-running kernel.
我的内核应该是启动了版本控制的,但是在包含<linux/modversions.h>
时却出错,打开这个头文件,发现里面就只上面的四个错误
如果不包含这个头文件,虽然就没有了这个错误,
但是又会发生某些调用unresolved,大家有没有碰到这种情况啊?
还有,编译遇到这个warning,不解决会不会出什么问题?
hello1.c:20: warning: implicit declaration of function `printk'
谢谢 |
|