Can't install GxEPD library

Hi, i’m trying to some code that i got to use with the epaper, this code but i can’t seem to figure out how to install the GxEPD library, i tried by using the whole folder, also tried with only the src folder, and now i get this error, also i did import the adafruit library, that i think i already had:

C:\Users\Miguel\Documents\Arduino\libraries\GxEPD-master\src/GxEPD.h:19:26: fatal error: Adafruit_GFX.h: No such file or directory

 #include <Adafruit_GFX.h>

                          ^

compilation terminated.

Multiple libraries were found for "GxEPD.h"
 Used: C:\Users\Miguel\Documents\Arduino\libraries\GxEPD-master
 Not used: C:\Users\Miguel\Documents\Arduino\libraries\src
exit status 1
Error compiling for board Arduino/Genuino Uno.

(deleted)

The adafruit GFX? I did that now and it gave me lots of error's.

This and more...

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeData16Transaction(unsigned int, unsigned long)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::endTransaction()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::GxIO_SPI(SPIClass&, signed char, signed char, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::GxIO_SPI(SPIClass&, signed char, signed char, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "GxEPD.h"
 Used: C:\Users\Miguel\Documents\Arduino\libraries\GxEPD-master
 Not used: C:\Users\Miguel\Documents\Arduino\libraries\src
exit status 1
Error compiling for board Arduino/Genuino Uno.

My guess is that while you were trying random things to fix the first error, you did something weird to your sketch, which is now causing these errors. Try downloading and compiling a fresh copy of the sketch from the websiste to see if that fixes the errors.

I'm going to do that, but how should i install the GxEPD library? I can only find the GxEPD2 library in the manager.

You install it the same way you did the first time around. Did you forget how you did it?

Here are the instructions:

  • Delete C:\Users\Miguel\Documents\Arduino\libraries\GxEPD-master
  • Download the latest release of the GxEPD library: https://github.com/ZinggJM/GxEPD/archive/3.0.5.zip
  • (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library...
  • Select the downloaded file GxEPD-3.0.5.zip.
  • Click "Open".

Ok, i did that, i also installed the Adafruit EPD (it asked for it), and now it's giving me all these error's again. Thanks for your help in advance.

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeData(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeData(unsigned char*, unsigned long)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeAddrMSBfirst(unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::readData16()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeData16(unsigned int, unsigned long)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::transferTransaction(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::transfer16Transaction(unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::readDataTransaction()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::readData16Transaction()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeCommandTransaction(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeDataTransaction(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::writeData16Transaction(unsigned int, unsigned long)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::endTransaction()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::GxIO_SPI(SPIClass&, signed char, signed char, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-3.0.5\GxIO\GxIO_SPI\GxIO_SPI.cpp.o (symbol from plugin): In function `GxIO_SPI::selectRegister(bool)':

(.text+0x0): multiple definition of `GxIO_SPI::GxIO_SPI(SPIClass&, signed char, signed char, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

Did you download a fresh copy of the EpaperDemo sketch from the link you posted? Are you compiling that fresh copy of the sketch?

Yes, I'm even using another pc

 Not used: C:\Users\Miguel\Documents\Arduino\libraries\src

It looks like you got that library installed twice. Delete the Arduino\libraries\src directory.

It also looks like the library got installed into the directory containing your sketch: EpaperDemo.ino . Delete the GxIO_SPI.cpp file if you find it in your EpaperDemo directory or in a subdirectory of your EpaperDemo directory.

Hi, i’m still getting this, i did delete the src library folder, and i’m using a freshly downloaded code.

It’s not complete since it’s too long to post, but here it is:

Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::fillScreen(unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::drawBitmap(unsigned char const*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::drawPixel(int, int, unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::init(unsigned long)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::GxGDEP015OC1(GxIO&, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::GxGDEP015OC1(GxIO&, signed char, signed char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_writeData(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_waitWhileBusy(char const*, unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_writeCommand(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_writeCommandData(unsigned char const*, unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_SetRamArea(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_SetRamPointer(unsigned char, unsigned char, unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_writeToWindow(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_setRamDataEntryMode(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_PowerOn()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_PowerOff()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::powerDown()'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::_InitDisplay(unsigned char)'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::GDOControl'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::softstart'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(.text+0x0): multiple definition of `GxGDEP015OC1::VCOMVol'

sketch\EpaperDemo.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\GxEPD-master\GxGDEP015OC1\GxGDEP015OC1.cpp.o (symbol from plugin): In function `GxGDEP015OC1::fillScreen(unsigned int)':

(deleted)

Doing that gave me this:

C:\Users\Miguel\AppData\Local\Temp\Rar$DIa9440.44342\EpaperDemo\EpaperDemo.ino:7:19: fatal error: GxEPD.h: No such file or directory

 #include <GxEPD.h>

                   ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

JohnTravolta:
i'm trying to some code that i got to use with the epaper, this code

Can you tell me where to find the sketch you are trying to compile?

The page you pointed to has these two links:
Official Demo: https://www.waveshare.com/wiki/1.54inch_e-Paper_Module
GxEPD: [iurl=https://github.com/ZinggJM/GxEPDhttps://github.com/ZinggJM/GxEPD[/iurl]

When I downloaded an unzipped the "Official Demo" file I got code directories for "arduino", Raspberry, and STM32. The "arduino" directory contains a sketch named "epd1in54-demo", not EpaperDemo. Is that the one???

Ah, it's neither of those, down on the page you got a button that says "Download", that's what you want.

I took a look at the EpaperDemo sketch and found the problem. The person who wrote the EpaperDemo sketch added #include directives for the .cpp files of the GxEPD library instead of the .h files!

Here’s how you fix it. Change lines 8-10 of the sketch from:

#include <GxGDEP015OC1/GxGDEP015OC1.cpp>    // 1.54" b/w
#include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
#include <GxIO/GxIO.cpp>

To:

#include <GxGDEP015OC1/GxGDEP015OC1.h>    // 1.54" b/w
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>

Problem solved.

Based on this absolutely basic error, I would be extremely skeptical of the quality of the rest of the code or any information shared by the author of the code.

1 Like

Yes! I got it working! Thanks a lot! I'll now take some time to figure out the positioning and such, but it's working! Thanks a lot to everyone!

You're welcome. I'm glad to hear it's working now. Enjoy!
Per