You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't know if the libraries got updated since you posted this or what, but when I try to build the source with a fully up to date Pi4, I get the following:
i2c_bus.cpp: In member function \u2018void i2c_bus::write_byte_and_read(uint8_t, uint8_t, uint8_t*, size_t)\u2019:
i2c_bus.cpp:84:38: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, 1, (typeof(i2c_msg().buf)) &command },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:85:16: error: \u2018I2C_M_RD\u2019 was not declared in this scope
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^~~~~~~~
i2c_bus.cpp:85:16: note: suggested alternative: \u2018I2C_RDWR\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^~~~~~~~
I2C_RDWR
i2c_bus.cpp:85:42: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:85:72: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs /
^~~~~~~
i2c_bus.cpp:83:11: error: elements of array \u2018i2c_msg messages [2]\u2019 have incomplete type
i2c_msg messages[2] = {
^~~~~~~~
i2c_bus.cpp:83:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:89:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
i2c_bus.cpp: In member function \u2018void i2c_bus::write(uint8_t, const uint8_t, size_t)\u2019:
i2c_bus.cpp:100:35: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data }
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:100:65: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data }
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs /
^~~~~~~
i2c_bus.cpp:99:11: error: elements of array \u2018i2c_msg messages [1]\u2019 have incomplete type
i2c_msg messages[1] = {
^~~~~~~~
i2c_bus.cpp:99:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:104:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
i2c_bus.cpp: In member function \u2018int i2c_bus::try_write_byte_and_read(uint8_t, uint8_t, uint8_t, size_t)\u2019:
i2c_bus.cpp:116:38: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, 1, (typeof(i2c_msg().buf))&byte },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:117:16: error: \u2018I2C_M_RD\u2019 was not declared in this scope
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^~~~~~~~
i2c_bus.cpp:117:16: note: suggested alternative: \u2018I2C_RDWR\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^~~~~~~~
I2C_RDWR
i2c_bus.cpp:117:42: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:117:71: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:115:11: error: elements of array \u2018i2c_msg messages [2]\u2019 have incomplete type
i2c_msg messages[2] = {
^~~~~~~~
i2c_bus.cpp:115:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:121:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
make: *** [: i2c_bus.o] Error 1
The text was updated successfully, but these errors were encountered:
Don't know if the libraries got updated since you posted this or what, but when I try to build the source with a fully up to date Pi4, I get the following:
i2c_bus.cpp: In member function \u2018void i2c_bus::write_byte_and_read(uint8_t, uint8_t, uint8_t*, size_t)\u2019:
i2c_bus.cpp:84:38: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, 1, (typeof(i2c_msg().buf)) &command },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:85:16: error: \u2018I2C_M_RD\u2019 was not declared in this scope
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^~~~~~~~
i2c_bus.cpp:85:16: note: suggested alternative: \u2018I2C_RDWR\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^~~~~~~~
I2C_RDWR
i2c_bus.cpp:85:42: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:85:72: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs /
^~~~~~~
i2c_bus.cpp:83:11: error: elements of array \u2018i2c_msg messages [2]\u2019 have incomplete type
i2c_msg messages[2] = {
^~~~~~~~
i2c_bus.cpp:83:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:89:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
i2c_bus.cpp: In member function \u2018void i2c_bus::write(uint8_t, const uint8_t, size_t)\u2019:
i2c_bus.cpp:100:35: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data }
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:100:65: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, (typeof(i2c_msg().len)) size, (typeof(i2c_msg().buf)) data }
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs /
^~~~~~~
i2c_bus.cpp:99:11: error: elements of array \u2018i2c_msg messages [1]\u2019 have incomplete type
i2c_msg messages[1] = {
^~~~~~~~
i2c_bus.cpp:99:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:104:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
i2c_bus.cpp: In member function \u2018int i2c_bus::try_write_byte_and_read(uint8_t, uint8_t, uint8_t, size_t)\u2019:
i2c_bus.cpp:116:38: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, 0, 1, (typeof(i2c_msg().buf))&byte },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:117:16: error: \u2018I2C_M_RD\u2019 was not declared in this scope
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^~~~~~~~
i2c_bus.cpp:117:16: note: suggested alternative: \u2018I2C_RDWR\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^~~~~~~~
I2C_RDWR
i2c_bus.cpp:117:42: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:117:71: error: invalid use of incomplete type \u2018struct i2c_msg\u2019
{ address, I2C_M_RD, (typeof(i2c_msg().len))size, (typeof(i2c_msg().buf))data },
^
i2c_bus.cpp:11:30: note: in definition of macro \u2018typeof\u2019
#define typeof(x) typeof(x)
^
In file included from i2c_bus.cpp:8:
/usr/include/linux/i2c-dev.h:66:9: note: forward declaration of \u2018struct i2c_msg\u2019
struct i2c_msg msgs; / pointers to i2c_msgs */
^~~~~~~
i2c_bus.cpp:115:11: error: elements of array \u2018i2c_msg messages [2]\u2019 have incomplete type
i2c_msg messages[2] = {
^~~~~~~~
i2c_bus.cpp:115:11: error: storage size of \u2018messages\u2019 isn\u2019t known
i2c_bus.cpp:121:16: error: \u2018ioctl\u2019 was not declared in this scope
int result = ioctl(fd, I2C_RDWR, &ioctl_data);
^~~~~
make: *** [: i2c_bus.o] Error 1
The text was updated successfully, but these errors were encountered: