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
Here is the tip to avoid the following error message (on my Pi B+) according smbus
root@pi04:~/SDK# make
make -C lib all
make[1]: Entering directory '/root/SDK/lib'
make -C c libiteadc.so
make[2]: Entering directory '/root/SDK/lib/c'
gcc -O2 -fpic -shared -o libiteadc.so *.c -I../../include
In file included from itead_wire.c:37:0:
/usr/include/linux/i2c-dev.h:38:8: error: redefinition of ‘struct i2c_msg’
/usr/include/linux/i2c.h:68:8: note: originally defined here
/usr/include/linux/i2c-dev.h:90:7: error: redefinition of ‘union i2c_smbus_data’
/usr/include/linux/i2c.h:128:7: note: originally defined here
edit the file lib/c/itead_wire.c and comment the line which include linux/i2c.h since I2C definitions are already in i2c-dev.h. It avoid duplication definition at compilation
include <linux/types.h>
//#include <linux/i2c.h>
include <linux/i2c-dev.h>
The text was updated successfully, but these errors were encountered:
Here is the tip to avoid the following error message (on my Pi B+) according smbus
root@pi04:~/SDK# make
make -C lib all
make[1]: Entering directory '/root/SDK/lib'
make -C c libiteadc.so
make[2]: Entering directory '/root/SDK/lib/c'
gcc -O2 -fpic -shared -o libiteadc.so *.c -I../../include
In file included from itead_wire.c:37:0:
/usr/include/linux/i2c-dev.h:38:8: error: redefinition of ‘struct i2c_msg’
/usr/include/linux/i2c.h:68:8: note: originally defined here
/usr/include/linux/i2c-dev.h:90:7: error: redefinition of ‘union i2c_smbus_data’
/usr/include/linux/i2c.h:128:7: note: originally defined here
edit the file lib/c/itead_wire.c and comment the line which include linux/i2c.h since I2C definitions are already in i2c-dev.h. It avoid duplication definition at compilation
include <linux/types.h>
//#include <linux/i2c.h>
include <linux/i2c-dev.h>
The text was updated successfully, but these errors were encountered: