读书人

warning:implicit declaration of fun

发布时间: 2012-02-21 16:26:23 作者: rapoo

warning:implicit declaration of function
我做简单的helloworld 内核模块,

file1.c :init_module()
file2.c :cleanup_module()

每个文件里面都include <linux/kernel.h>

虽然make之后能加载模块,但是还是会提示说:

implicit declaration of function 'printk '

不知道是为什么????

[解决办法]
隐含的函数声明

没有包含printk的头文件

读书人网 >UNIXLINUX

热点推荐