library botch-iness (newest Adafruit_GFX doesn't work)

Not open for further replies.


Using arduino 1.8.12 with the latest teensyduino, I get weird behavior with Adafruit_GFX library.
This appears to be the case because teensy has one version of the library installed whilst I have also requested that the IDE Library manager install the newest version.

The result:
Multiple libraries were found for "Adafruit_GFX.h"
Used: ...\arduino-1.8.12\hardware\teensy\avr\libraries\Adafruit_GFX
Not used: ...\Arduino\libraries\Adafruit_GFX_Library

(but we get a link error with duplicate symbols and the project's build/libraries looks like this:

Adafruit_GFX_Library/ (etc)

So it appears that the newer version of the library has a different name (ending in _Library).

As a general question:

1. what are the teensy/avr/libraries about? Optimized-for-teensy versions of standard libraries?
2. if this is true, does that mean that we must/should avoid using newer versions of the libraries?

thanks for any guidance on this!
Answering my own question. I did find that if I use the library manager to request the matching version of the teensy's included library (1.5.6) i was able to get past the link errors.

Still interested in learning the answer to the general question: if i want to use a newer version of a library that comes in teensy's library subdir, is there a procedure for doing so?
The sort of simple answer is to not have the duplicates... But that can be easier said than done, especially if you build for multiple platforms.

With the Adafruit-GFX code installed by Teensyduino, I believe that somewhere in the release process Paul may try to update the Teensy installed version to the current version from Adafruit. Usually somewhere in the release beta cycle, such that hopefully we find any compatibility issues. And when we find that there are some changes needed to properly work on a Teensy we issue Pull Requests back to Adafruit for the changes.
Kurt, thank you for the response. I have been dabbling with this and can concur that it can be easier said than done.
Had the same thing for CAN and GPS libraries, solution was to just delete (or not install in the first place) those installed by Teensyduino.
Any chance I could talk you into trying 1.53-beta3?

We are no longer bundling an (old) copy of Adafruit_GFX, and the 1.53-beta3 installer is now able to clean up any lingering Adafruit_GFX from prior Teensyduino installers. So with this new version, if you've installed Adafruit_GFX using the Arduino's Library Manager, we should not be causing any more interference. At least that's the way it's supposed to work.

Please let me know if this fully resolves the problem you were seeing? We've about to release a final non-beta 1.53, so if there's still "botch-iness", please let me know and try to give me some idea how to recreate the problem with 1.53-beta3 so I can make sure it's really fixed before we release 1.53.
Hi Paul - I did try the windows 10 version of 1.53 beta3 and was successful after a little wrangling.

1. installing did succeed in deleting the GFX library from arduino-1.8.12/hardware/teensy/avr/libraries
2. this led to me upgrading GFX, BusIO and SSD1306 to Adafruit's latest and greatest
3. this led to some weird permission errors, I suspect this is the fault of the Arduino Library Manager
4. after manually deleting some Adafruit libraries from the library-managed area and re-installing, I was able to successfully build and run my test with the latest and greatest combination of teensy plus Adafruit SSD+GFX.

As an aside, I may not be the best tester for this because I do all that I can to avoid the IDE. I have a custom CLI build system, etc that generally insulates me from automated updates, etc.

cheers to beta3 on my side.
Not open for further replies.