SSD1306 on electron - compile error

Hey,

I get a compilation error on Web IDE when I go to compile the example code for the SSD1306 library. Is this library not ready for use with Electron? As a related idea, perhaps there should be a way of knowing which libraries have been ported to which devices, so that you can filter the library list to show only libraries that work with your device.

Console log:

ssd1306_128x64_spi.cpp:20:26: fatal error: Adafruit_GFX.h: No such file or directory
 This is an example for our Monochrome OLEDs based on SSD1306 drivers
                          ^

compilation terminated.
make[1]: *** [../build/target/user/platform-10ssd1306_128x64_spi.o] Error 1
make: *** [user] Error 2

UPDATE:

If I change the #include statements for this library from:

#include "Adafruit_GFX.h"
#include "Adafruit_SSD1306.h"

to

#include "Adafruit_SSD1306/Adafruit_GFX.h"
#include "Adafruit_SSD1306/Adafruit_SSD1306.h"

then the compiler goes a bit further before spitting out this error message:

Adafruit_SSD1306/Adafruit_GFX.cpp:36:0: warning: "pgm_read_byte" redefined [enabled by default]
 #define pgm_read_byte(addr) (*(const unsigned char *)(addr))
 ^
In file included from ../wiring/inc/spark_wiring.h:37:0,
                 from ./inc/application.h:36,
                 from Adafruit_SSD1306/Adafruit_GFX.h:4,
                 from Adafruit_SSD1306/Adafruit_GFX.cpp:34:
../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
 #define pgm_read_byte(x)  (*(x))
 ^
../../../build/target/wiring/platform-10-m//libwiring.a(spark_wiring_random.o): In function `randomSeed(unsigned int)':
/mnt/compile-service-shared-workspace/10_electron_15_3/firmware/wiring/src/spark_wiring_random.cpp:5: multiple definition of `random(int)'
../../../build/target/user/platform-10/libuser.a(ssd1306_128x64_spi.o):ssd1306_128x64_spi.cpp:45: first defined here
collect2: error: ld returned 1 exit status
make: *** [47bbcd9742b47d7175d08878e60ff8db7efda0c80d0deeab8f32613b65f5.elf] Error 1

This is a known issue of the sample that also hits on Photon.

Just remove the custom implementation of random() in the sample.

See here