当前位置: 技术问答>linux和unix
疯了,一包含#include <vamlloc.h>, 就编译错误!
来源: 互联网 发布时间:2015-09-24
本文导语: 错误如下: In file included from 1.c:7: /usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc': /usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: `boot_cpu_data_R0657d037' undeclared (first use in this function) /usr/src/linux-2.4.18-3/include/linu...
错误如下:
In file included from 1.c:7:
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: `boot_cpu_data_R0657d037' undeclared (first use in this function)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: (Each undeclared identifier is reported only once
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: for each function it appears in.)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc_dma':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:44: `boot_cpu_data_R0657d037' undeclared (first use in this function)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc_32':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:53: `boot_cpu_data_R0657d037' undeclared (first use in this function)
应该是比较简单的编译问题,但我一直查不到原因!请高手指点!
In file included from 1.c:7:
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: `boot_cpu_data_R0657d037' undeclared (first use in this function)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: (Each undeclared identifier is reported only once
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:35: for each function it appears in.)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc_dma':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:44: `boot_cpu_data_R0657d037' undeclared (first use in this function)
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h: In function `vmalloc_32':
/usr/src/linux-2.4.18-3/include/linux/vmalloc.h:53: `boot_cpu_data_R0657d037' undeclared (first use in this function)
应该是比较简单的编译问题,但我一直查不到原因!请高手指点!
|
内核里好像没有那个boot_cpu_data_R0... 估计还是你自己的头文件写的不对,是不是哪里丢了结束符什么的啊??
|
你的头文件本来就有问题
|
check your code again
|
改为#include
或直接
//#include
或直接
//#include
|
去除对的包含,看看linux/module.h中的处理。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。