Timeline for Error: "invalid use of incomplete type" and "forward declaration"
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 31, 2016 at 10:19 | history | edited | frarugi87 | CC BY-SA 3.0 |
fixed a typo
|
| Mar 29, 2016 at 19:36 | comment | added | frarugi87 | @DavideTagliafierro Glad you made it. Anyway you should not include the cpp file too; and the common rule is thaty you should only include h files, and in h files you should never define variables (only declare them - as external, of course) nor implement functions outside class definition; these should be performed in cpp or ino files.. | |
| Mar 29, 2016 at 18:47 | comment | added | Davide Tagliafierro | Thanks a lot for the hint. I tried to modify the library following your indications, but I got even more "multiple definition" than before. I think that the TFT library needs more changes... I ended up moving all the functions of my MESmenu library to the .h file and delete the .cpp file. I was stuck since a long time on that and in one day you help me getting out. Thanks. | |
| Mar 29, 2016 at 15:09 | comment | added | frarugi87 | @DavideTagliafierro Modified the answer; it looks like the library is broken ;) | |
| Mar 29, 2016 at 15:08 | history | edited | frarugi87 | CC BY-SA 3.0 |
Edited according to new inputs from the OP
|
| Mar 29, 2016 at 11:48 | comment | added | Davide Tagliafierro | Question updated with more details. I try to move all the functions from the .cpp file to the .h file it works (not tested on the board, but it compiles). I still doesn't understand why. | |
| Mar 29, 2016 at 11:15 | comment | added | frarugi87 | Ok, and where is MESmenu.cpp? Can you post the whole modified files in the question? Or at least the ino, mesmenu.h and mesmenu.cpp | |
| Mar 29, 2016 at 9:40 | comment | added | Davide Tagliafierro |
libraries\MESmenu\MESmenu.cpp.o: In function 'Adafruit_GFX::image(PImage&, unsigned int, unsigned int)': D:\Software\arduino-1.6.7\libraries\TFT\src/utility/Adafruit_GFX.h:231: multiple definition of 'Adafruit_GFX::image(PImage&, unsigned int, unsigned int)' sketch\test_MESmenu.ino.cpp.o:D:\Software\arduino-1.6.7\libraries\TFT\src/utility/Adafruit_GFX.h:231: first defined here
|
|
| Mar 29, 2016 at 9:19 | comment | added | frarugi87 | @DavideTagliafierro multiple definitions of what? | |
| Mar 29, 2016 at 9:09 | comment | added | Davide Tagliafierro | I try with your suggestion, but now I got "multiple definition" releated to Adafruit_GFX.h that is included in the TFT library. Do you think that the problem could be in the TFT library itself? | |
| Mar 29, 2016 at 8:44 | history | answered | frarugi87 | CC BY-SA 3.0 |