Adafruit_ST7735 + Adafruit_GFX Teensy 3

Status
Not open for further replies.

taskman

Well-known member
Adafruit_ST7735\Adafruit_ST7735.cpp.o: In function `Adafruit_GFX':
\arduino-1.0.3-teensy3\libraries\Adafruit_GFX/Adafruit_GFX.h:28: undefined reference to `vtable for Adafruit_GFX'
collect2: ld returned 1 exit status

I have been trying to figure out the problem. From my limited experience this error usually happens when a function/method was declared as virtual and wasn't implemented. I see the new print.h is a bit different than the original. It seems the only virtual functions are the write functions, but they where also virtual in the original print.h. I tried removing the #if Arduino >= 100 in Adafruit_GFX, but that also didn't do much. I tried copying the original function/method signatures from print.h into the new one and try to figure out what changed. I just caused a big mess there.

In short, I have no clue

Easiest way to reproduce this would be to try and compile their "graphictest" example. I think the problem is in Adafruit_ST7735 maybe not implementing something, because when I don't construct Adafruit_ST7735 I don't get a compiler failure
 
I had a conversation with Adafruit. They're concerned any changes to GFX might break their many other libraries.

My understanding is Chris's pull request only fixes the object definition.

https://github.com/adafruit/Adafruit-GFX-Library/pull/7

Is this fully compatible with the other libraries that depend upon GFX? I'm not sure what we can do, short of compiling and testing GFX in combination with many Adafruit displays on Uno, Mega and other AVR boards they sell.... to convince them to merge this fix?
 
I think his pull request is sufficient to make it compile and work? I'm not sure, but it addresses the virtual destructor and missing pure virtual on DrawPixel.


On a separate note, I wouldn't mind making my native version compatible with their GFX stuff, and even put the changes into their ST7735 lib, but due to the fact they don't make some functions virtual that I want to override, it can't really be done - and it doesn't sound like they are keen to change it.

I don't think software is really one of their strengths, the code is pretty weird, as if written by a non-programmer, or at least someone who doesn't quite understand C++.

- Peter
 
Status
Not open for further replies.
Back
Top