[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

Compiler error using Adafruit_GFX and ST7735 [solved] RSS feed
Forum Index » tcMenu Arduinio library
Author Message
MartinBzm


Joined: Sep 9, 2020
Messages: 4
Offline
Hello all, hope you can help me.
I am using the Adafruit_GFX and the Adafruit_ST7735 libraries for a TFT display.
I have adjusted the .ino like this:
#include "tcMenu_menu.h"
#define P_S_RES 5
#define P_S_DC  6
#define P_S_CS  7
#define P_S_BL  50
Adafruit_ST7735 tftDisplay = Adafruit_ST7735(P_S_CS, P_S_DC, P_S_RES);

void setup() {
    setupMenu();
}

void loop() {
    taskManager.runLoop();
}


Now the compiler throws errors I cannot solve:
In file included from F:\Projecten\Arduino\libraries\IoAbstraction\src/SwitchInput.h:19:0,
                 from F:\Projecten\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:244,
                 from F:\Projecten\Arduino\libraries\tcMenu\src/tcMenu.h:9,
                 from sketch\tcMenu_menu.h:15,
                 from F:\Projecten\Arduino\tcMenu\tcMenu.ino:1:
F:\Projecten\Arduino\libraries\IoAbstraction\src/TaskManager.h:90:6: error: multiple definition of 'enum TimerUnit'
 enum TimerUnit : uint8_t {
      ^~~~~~~~~
In file included from F:\Projecten\Arduino\libraries\TaskManagerIO\src/TaskManagerIO.h:17:0,
                 from F:\Projecten\Arduino\libraries\IoAbstraction\src/BasicIoAbstraction.h:15,
                 from F:\Projecten\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:18,
                 from F:\Projecten\Arduino\libraries\tcMenu\src/tcMenu.h:9,
                 from sketch\tcMenu_menu.h:15,
                 from F:\Projecten\Arduino\tcMenu\tcMenu.ino:1:
F:\Projecten\Arduino\libraries\TaskManagerIO\src/TaskTypes.h:124:6: note: previous definition here
 enum TimerUnit : uint8_t {
      ^~~~~~~~~
In file included from F:\Projecten\Arduino\libraries\IoAbstraction\src/SwitchInput.h:19:0,
                 from F:\Projecten\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:244,
                 from F:\Projecten\Arduino\libraries\tcMenu\src/tcMenu.h:9,
                 from sketch\tcMenu_menu.h:15,
                 from F:\Projecten\Arduino\tcMenu\tcMenu.ino:1:
F:\Projecten\Arduino\libraries\IoAbstraction\src/TaskManager.h:103:7: error: redefinition of 'class Executable'
 class Executable {
       ^~~~~~~~~~

The actual list of errors is much longer but hoping it is a simple oversight that will solve the rest as well.
Thanks for your support!
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
It looks like you have an old version of IOAbstraction that still has TaskManager.h present. Can you check tcMenu and IOAbstraction libraries are fully up to date. Basically task manager was split out in the last release.
MartinBzm


Joined: Sep 9, 2020
Messages: 4
Offline
OK Davetcc,
I have downloaded the libraries and unpacked them in the Arduino library folder, simply overwriting the libraries installed with the Arduino IDE library-manager.
Annnnd.... It works!
Thank you very much.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
That's a bit worrying though, it tends to suggest that existing users are going to hit this quite a bit.

Thanks for reporting this as we could start to see more cases of this.

We'll need to look at recreating this on a test machine.
MartinBzm


Joined: Sep 9, 2020
Messages: 4
Offline
The root-cause is that I installed the libraries through the library manager of the Arduino IDE. The latest version there is older than the ones I downloaded from the site.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
I've tried this myself with Arduino IDE and it seems to remove the task manager files with the very latest version.

However, I've added back an empty TaskManager.cpp & a .h that just includes TaskManagerIO.h. This is probably the safe thing to do, and can be removed in the future once most people have had time to upgrade.

This should work with all versions of LibraryManager and all other IDEs/platforms too. I'll make a patch release for this soon.
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.