I have used several of the FriendElec CPUs (NanoPi Fire3, NanoPC T4, NanoPi NEO4, plus others) and for the first time, I have to access an I2C device.

I am running Ubuntu 18.04.2 LTS

I can open the /dev/i2c-2 device and set the device address but I get compile errors as none of the i2c_smbus functions seems to be defined (for example i2c_smbus_read_word_data).

What am I missing before accessing I2C devices using the smbus functions?

Is there another way to access i2c devices from C/C++?