阅读内容

编译Linux时出现:“错误:数组元素的类型不完全”

[日期:2008-07-31] 来源:Linux公社  作者:Linux编辑


系统:Fedora Core4

内核: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: 错误:数组元素的类型不完全

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




相关资讯       Linux内核 
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google