Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK I2C Compilation Problem #2

Open
hallard opened this issue Nov 6, 2014 · 1 comment
Open

SDK I2C Compilation Problem #2

hallard opened this issue Nov 6, 2014 · 1 comment

Comments

@hallard
Copy link

hallard commented Nov 6, 2014

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>

@Philipp97714
Copy link

I think the Segnix library is discontinued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants