Bodmer / TFT_eFEX

A support library for TFT_eSPI that adds commonly used extra functions
Other
83 stars 27 forks source link

error: redefinition of 'class TFT_eFEX' when using in custom lib #20

Closed flyceo closed 4 years ago

flyceo commented 4 years ago

I use this class in a custom lib and every try to compile ends with this error message:

In file included from include/widget.h:2:0, from src/main.cpp:10: /Users/Roland/.platformio/lib/TFT_eFEX_ID6164/TFT_eFEX.h:63:7: error: redefinition of 'class TFT_eFEX' class TFT_eFEX : TFT_eSPI { ^ In file included from src/main.cpp:4:0: /Users/Roland/.platformio/lib/TFT_eFEX_ID6164/TFT_eFEX.h:63:7: error: previous definition of 'class TFT_eFEX' class TFT_eFEX : TFT_eSPI { ^

By the way, my lib also uses TFT_eSPI that works absolutely fine

flyceo commented 4 years ago

I added

`#ifndef _TFTeFEXH

define _TFTeFEXH

...

endif`

to TFT_eFEX.h to solve that for now.

Bodmer commented 4 years ago

Thanks, missed that!

Now fixed.