sduino icon indicating copy to clipboard operation
sduino copied to clipboard

Fails to compile when using Ucglib (ST7735 & other OLEDs)

Open IceC00l opened this issue 4 years ago • 2 comments

Trying to compile any Example code (Hello World) when using Ucglib yields a fatal error: invalid argument

Documents/Arduino/libraries/Ucglib/src/Ucglib.h:65: syntax error: token -> 'Ucglib' ; column 12

This is where "class Ucglib : public Print" is in the header file. Using IDE 1.8.13. Is there any chance this ST7735 compatible library can be supported/fixed for the SDuino MCU family?

IceC00l avatar Feb 05 '21 16:02 IceC00l

that's a c++ lib you're trying to include. sduino is plain C only.

However, it looks like there's a plain C version of that lib on github. I'd start by trying that one: https://github.com/olikraus/ucglib/tree/master/csrc

prosper00 avatar Feb 05 '21 17:02 prosper00

Right - thanks for the heads up: currently I have the ucglib installed already and I see no csrc directory under the library (which is normal I guess - I am using it for other ATmel stuff), if I manually include that directory I suppose I need to modify some environment vars to use that one instead of the C++ src dir to try to compile with your toolchain or do I have to do some porting as explained in https://tenbaht.github.io/sduino/api/migration/? Thanks again!

IceC00l avatar Feb 06 '21 02:02 IceC00l