so I'm starting up a new project and trying to use a PCA9685 chip with an ATMEGA48PB. I use the following library: https://github.com/prestonsn/PCA9685-Multi-Channel-Servo-Controller-Driver-for-AVR-ATmega and the i2c library that they recommend. So the problem is that the library states pca9685_init() has two variables in it which are both integers, but when I place integers in them, the following error pops up: "undefined reference to `pca9685_init(unsigned char, unsigned int)". Being quite new to this, I have no idea how to fix it. Does anyone have any ideas? (Image linked:(https://i.stack.imgur.com/WBESt.png))
I tried changing the variables to unsigned char and unsigned int, which didn't help, I tried using hexadecimals, integers, unsigned integers, unsigned chars, and so on and even combinations and nothing worked so far. I'm thinking this might be a library integration error or something of the sorts.
EDIT: So I fixed this problem by changing my project into a C executable instead of a C++ executable. I'm curious as to how I would make it work on C++ though, I'd heard that C++ and C are compatible? How come the C library I linked above doesn't work or at least sends weird errors on a C++ executable?