Is there anything I can do about this library issue? "expected unqualified-id before numeric constant"

That’s the whole error. I copied it from the middle window, not the terminal.

And it is in 1306.h.
That’s why I think it must be fixable, it’s an Adafruit product.
It’s creating on/off for pixels, not making an int.

Morning Joe.

What are the next couple of lines after the error please? Is one of then suspiciously similar to:

note: in expansion of macro ‘xxxxxx’

If so, you are probably defining a macro with the same name as another variable/function somewhere else in the code.

Search the code for SSD1306_BLACK.


Another ‘wild guess’ (without seeing the context where the error occurs - i.e. where the macro is expanded) is that the comment might be causing the compiler issues.
Some compilers will nicely remove comments from the #define line but others do a simple text substitution that includes the comment and so generates all sorts of errors later on.

Ok, I’ve done a Google search for SSD1306_BLACK and this is one page that came up in the results:

It seems that the macro is defined in the Adafruit SSD1306 library, more specifically in the file Adafruit_SSD1306.h – are you using this file in your code? If so, you don’t need to #define SSD1306_BLACK 0 yourself.

Or, is the error occurring in this actual file?