Adafruit Thermal Library - no longer compiling [SOLVED]

Hi all,

I’ve looked into a past project that used the @peekay123 adaptation of Adafruit’s Library for thermal printers and noticed that the library it’s no longer compiling anymore. I’ve tried a basic example from the Web IDE (just including the library in an empty project) and it returns the following error messages

lib/Adafruit_Thermal/src/Adafruit_Thermal.h:36:39: error: expected class-name before '{' token
 class Adafruit_Thermal : public Print {

lib/Adafruit_Thermal/src/Adafruit_Thermal.h:34:21: error: 'Stream' has not been declared
 #define SERIAL_IMPL Stream

lib/Adafruit_Thermal/src/Adafruit_Thermal.h:43:11: note: in expansion of macro 'SERIAL_IMPL'
     begin(SERIAL_IMPL* serial, int heatTime=200),

Could that be something related to recent updates to the library manager?

@amicoLeo, I’ll have a look and get back to you.

1 Like

Try adding #include <Particle.h> before the #include <Adafruit_Thermal.h> line.


That did the job. Thanks!

1 Like