During linux compilation, the following error occurs: "error: the array element type is incomplete"

Source: Internet
Author: User
During linux compilation, the following error occurs: "error: the type of array elements is incomplete" -- Linux general technology-Linux programming and kernel information. For details, see the following. System: Fedora Core4

Kernel: 2.6.11.1

Error:

1. CC drivers/i2c/i2c-core.o
In file sorted ded 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] Error 1
Make [1]: *** [drivers/i2c] Error 2
Make: *** [drivers] Error 2

Solution:

Change struct i2c_msg [] In line 58,197 of include/linux/i2c. h to struct i2c_msg * msg

2, In file encoded from drivers/media/video/bttv-driver.c: 42:

Drivers/media/video/bttvp. h: 233: error: the type of the array element is incomplete.

The type is not allowed to be used before the declaration, so the change order can be passed smoothly.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.