Problem getting SSD1306 to work on core

Thanks for the quick reply. I’m using the Particle Build and the reason I’m adding .h and .cpp files into new tabs manually is because I get this error if I try “using this example”:

ssd1306_128x64_i2c.cpp:19:26: fatal error: Adafruit_GFX.h: No such file or directory
 int random(int maxRand);
                          ^
		
	

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

	



    
  

  

  
    Error: Could not compile. Please review your code.

I’m not understanding this error because the Adafruit_GFX.h, Adafruit_GFX.cpp, Adafruit_SSD1306.h, Adafruit_SSD1306.cpp files are all included in the “Included Libraries” see pic.

Then if I take the suggestions from ScruffR in “Adafruit SSD1306 [SOLVED]” and change includes to the following I get errors about “pgm_read_byte” in the wiring.h.

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

I gets errors both ways…