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
In file included from /usr/include/aarch64-linux-gnu/bits/byteswap.h:34:0,
from /usr/include/byteswap.h:24,
from /srv/maverick/var/build/jtx1inst/src/jtx1pow.c:17:
/srv/maverick/var/build/jtx1inst/src/jtx1pow.c: In function ‘convShuntVol’:
/srv/maverick/var/build/jtx1inst/src/jtx1pow.c:43:27: warning: implicit declaration of function ‘i2c_smbus_read_word_data’ [-Wimplicit-function-declaration]
uint16_t v = __bswap_16(i2c_smbus_read_word_data(file, reg));
^
/srv/maverick/var/build/jtx1inst/src/jtx1pow.c: In function ‘jtx1_get_ina3221_userspace_i2c’:
/srv/maverick/var/build/jtx1inst/src/jtx1pow.c:173:7: warning: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration]
if (ioctl(file, I2C_SLAVE, addr) < 0) {
^~~~~
/srv/maverick/var/build/jtx1inst/src/jtx1pow.c:203:10: warning: ‘return’ with a value, in function returning void
return 0;
...
[100%] Linking C executable jtx1inst_demo
libjtx1inst.so: undefined reference to `i2c_smbus_read_word_data'
collect2: error: ld returned 1 exit status
CMakeFiles/jtx1inst_demo.dir/build.make:95: recipe for target 'jtx1inst_demo' failed
make[2]: *** [jtx1inst_demo] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jtx1inst_demo.dir/all' failed
make[1]: *** [CMakeFiles/jtx1inst_demo.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
If I install libi2c-dev and include i2c/smbus.h in src/jtx1pow.c it gets rid of the implicit declaration but still doesn't link.
The text was updated successfully, but these errors were encountered:
Related to #1
...
If I install libi2c-dev and include i2c/smbus.h in src/jtx1pow.c it gets rid of the implicit declaration but still doesn't link.
The text was updated successfully, but these errors were encountered: