Library broken from github. Is there an easy fix?

I'm getting the following error message:

libraries/Adafruit_SSD1331_OLED_Driver_Library_for_Arduino/Adafruit_SSD1331.cpp.o:( multiple definition of `glcdFont'
libraries/Adafruit_GFX-master/glcdfont.c.o:( first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.

and I'm not sure how to fix?

The library I'm using is:

I installed it and loaded up both example files, both had an error saying "const" was written twice. So I removed the extra const and tried again. Now I'm stuck with the above error.

Looking at the github page, it says "Back off on the PROGREM defintions, const is enough." And it was added 12 days ago? That sounds very aggressive, especially considering the original error seems related to that lol

Try using the latest release instead:
By installing the library from the tip of the repository you are beta testing. That can be a way to get the latest enhancements and to contribute to development but you also have to expect that the code may not be completely stable.

I downloaded it, but the issue still seems to be there.

I think I might have linked the wrong library actually, this is the one I meant to link:

That library requires the Adafruit_GFX library. Adafruit had a library for each display type, in this case SSD1331, but puts all the code that can be shared among all display types in the Adafruit_GFX library.

Please do this:

  • Install unmodified libraries.
  • Open one of the unmodified examples.
  • Sketch > Compile/Verify
  • When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

Ok, so here is the complete walk through of everything I’ve done, following your steps.

  1. I’ve come from this video: Arduino Tutorial: Color OLED SSD1331 display with Arduino Uno from - YouTube
  2. In the description, it links to this page: GitHub - adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino: For 0.96" OLEDs in the Adafruit shop
  3. I clicked the Clone or Download button, and then Download Zip.

I also have these adafruit libraries already:
Adafruit-SSD1331-OLED-Driver-Library-For-Arduino- 1.0.1

But for this walkthrough, I’ve emptied the library folder.

  1. Opened Sketch > Include Library > Add .ZIP library and added GFX-Master and SSD1331

  2. If I open the bmp example, I get this when compiling:

WARNING: Spurious .github folder in 'Adafruit SSD1331 OLED Driver Library for Arduino' library
In file included from /Users/Kounipo/Documents/Arduino/libraries/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino-master/Adafruit_SSD1331.cpp:19:0:
/Users/Kounipo/Documents/Arduino/libraries/Adafruit_GFX-master/glcdfont.c:13:7: error: duplicate 'const'
 const const unsigned char glcdFont[] PROGMEM = {
exit status 1
Error compiling for board Arduino/Genuino Uno.

This is the file it has a problem with:

#ifndef FONT5X7_H
#define FONT5X7_H

#ifdef __AVR__
 #include <avr/io.h>
 #include <avr/pgmspace.h>
 #define PROGMEM
// Standard ASCII 5x7 font

const const unsigned char glcdFont[] PROGMEM = {


A fresh download and install of the Adafruit_SSD1331 and Adafruit_GFX libs compiles the bmp example without issue. You need to find the corrupt files on your system and remove them (zip files also). Then download and reinstall.