variable `xxx' has initializer but incomplete type
2013-11-28 18:17
627 查看
说明xxx对应的类型没有找到,类型需要定义.
static struct i2c_driver touchkey_i2c_driver =
{
.driver = {
.owner = THIS_MODULE,
.name = "i2ctouchpannel",
},
.probe
= &i2ctouchpannel_probe,
.remove
= &i2ctouchpannel_remove,
.id_table
= i2ctouch_pannel,
};
在调用内核已经定义好的结构体去初始化我们定义的变量的时候,
如出现 variable 'touchkey_i2c_driver' has initializer but incomplete type,其实就是说明touchkey_i2c_driver
没有被定义,进而说明是“i2c_driver ”
没有被定义,更进一步,其实就是没有#include 相对应的头文件。
如#include <linux/i2c.h>之后,就不会出现variable
'touchkey_i2c_driver' has initializer but incomplete type
static struct i2c_driver touchkey_i2c_driver =
{
.driver = {
.owner = THIS_MODULE,
.name = "i2ctouchpannel",
},
.probe
= &i2ctouchpannel_probe,
.remove
= &i2ctouchpannel_remove,
.id_table
= i2ctouch_pannel,
};
在调用内核已经定义好的结构体去初始化我们定义的变量的时候,
如出现 variable 'touchkey_i2c_driver' has initializer but incomplete type,其实就是说明touchkey_i2c_driver
没有被定义,进而说明是“i2c_driver ”
没有被定义,更进一步,其实就是没有#include 相对应的头文件。
如#include <linux/i2c.h>之后,就不会出现variable
'touchkey_i2c_driver' has initializer but incomplete type
相关文章推荐
- variable `xxx' has initializer but incomplete type
- variable 'std:ofstream' has initializer but incomplete type 错误
- Error: variable 'QApplication app' has initializer but incomplete type
- qt error: variable `QPainter painter' has initializer but incomplete type
- variable 'std:ofstream' has initializer but incomplete type
- paip.variable xxx has initializer but incomplete type 解决方案
- variable `xxx' has initializer but incomplete type
- variable "xxx" has initializer but incomplete type
- 关于错误: error: variable ‘QApplication app’ has initializer but incomplete type
- error: variable ‘QApplication a’ has initializer but incomplete type
- variable 'std:ofstream' has initializer but incomplete type
- gcc编译出现field 'xxx' has incomplete type的问题
- C++报错集合:XX does not name a type;field `XX' has incomplete type
- MissingReferenceException: The object of type 'Texture2D' has been destroyed but you are still tryi
- Compiler Warning C4150: deletion of pointer to incomplete type 'XXX'; no destructor called
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- Uncaught TypeError: Object [object Object] has no method 'xxx'
- 两个C++编译异常及解决方法-does not name a type和field `XX' has incomplete type
- variable `xxx' has initializer but incomplete type