What is this compile error telling me?

I've had to replace all our computers after a recent lightning strike (that was fun) and while I had everything backed up I'm getting compile errors that didn't appear prior.

I'm thinking the compiler is looking for a library(s) here and doesn't have the correct path?? The compiler mentions "#include <Adafruit_I2CDevice.h>" however that library was never used in the original code.

In file included from C:\Users\aircr\Documents\Arduino\libraries\Adafruit_PCD8544_Nokia_5110_LCD_library/Adafruit_PCD8544.h:26:0,
from C:\Users\aircr\Documents\Arduino\Stair_Lighting\Stair_Lighting_1.2.08.05\Stair_Lighting_1.2.08.05.ino:20:

C:\Users\aircr\Documents\Arduino\libraries\Adafruit_GFX_Library/Adafruit_GFX.h:12:10: fatal error: Adafruit_I2CDevice.h: No such file or directory

 #include <Adafruit_I2CDevice.h>

          ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

missing this..

~q

It's a library used in the above lib..
~q

Can see them mentioning it here..
https://github.com/adafruit/Adafruit-GFX-Library
~q

So its a library referenced by a library neither of which is included in the original code?

#include <EEPROMVar.h>
#include <Adafruit_PCD8544.h>
#include <ClickEncoder.h>
#include <TimerOne.h>
#include <Wire.h>
#include <jm_PCF8574.h>

for that lib..
Adafruit-PCD8544-Nokia-5110-LCD-librar
it says this..
You will also need the Adafruit GFX Graphics core
Which then leads you back..

~q

Probably just need to load the Gfx it maybe it loads it's dependencies automatically??

~q

Ok thanks for that. There was probably 10 years worth of libraries on the zapped device. I guess I didn't have it all backed up.

watch out, could be new versions too..
end up having to modify code to make it all work again..
~q

1 Like

I do have the GFX loaded. Can't find the I2C anywhere on board though. I'll have to go find that again.

I'm scared to go back through years of sketches and see what suddenly won't compile.

Oh well, it's only this recent sketch that I'm concerned about really. It's a complicated one.

Where to find <Adafruit_I2CDevice.h> file for Arduino

https://forums.adafruit.com/viewtopic.php?t=168864

Fixed this issue by installing the Adafruit_BusIO library from within the IDE. This pulls in everything required.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.