设为首页 加入收藏

TOP

编译Linux时出现:“错误:数组元素的类型不完全”
2014-11-24 00:35:38 来源: 作者: 【 】 浏览:3
Tags:编译 Linux 出现 错误 元素 类型 完全

内核:2.6.11.1


出现错误:


1、CC drivers/i2c/i2c-core.o
In file included from drivers/i2c/i2c-core.c:29:
include/Linux/i2c.h:58: error: array type has incomplete element type
include/Linux/i2c.h:197: error: array type has incomplete element type
drivers/i2c/i2c-core.c: In function ‘i2c_transfer’:
drivers/i2c/i2c-core.c:594: error: type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c: In function ‘i2c_master_send’:
drivers/i2c/i2c-core.c:620: error: type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c: In function ‘i2c_master_recv’:
drivers/i2c/i2c-core.c:649: error: type of formal parameter 2 is incomplete
make[2]: *** [drivers/i2c/i2c-core.o] 错误 1
make[1]: *** [drivers/i2c] 错误 2
make: *** [drivers] 错误 2


解决方法:


将include/Linux/i2c.h中第58,197行内struct i2c_msg msg[]改为struct i2c_msg *msg


2、In file included from drivers/media/video/bttv-driver.c:42:


drivers/media/video/bttvp.h:233: 错误:数组元素的类型不完全


不允许类型在声明前使用,因此调换次序就可以顺利通过。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇php中init()函数和Linux系统的ini.. 下一篇对于Linux socket与epoll配合相关..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: