Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So many errors with newer libs #272

Open
Stig2k opened this issue Jun 22, 2023 · 6 comments
Open

So many errors with newer libs #272

Stig2k opened this issue Jun 22, 2023 · 6 comments

Comments

@Stig2k
Copy link

Stig2k commented Jun 22, 2023

Had a scroller working for years then damaged the D1 it was running on. Downloaded the latest version from here then installed the IDE and the needed libraries. So many errors and warnings!

Does anyone know what older versions of required libraries might get this project working again?

C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:37: warning: "SECS_PER_MIN" redefined
   37 | #define SECS_PER_MIN  (60UL)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:67: note: this is the location of the previous definition
   67 | #define SECS_PER_MIN  ((time_t)(60UL))
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:38: warning: "SECS_PER_HOUR" redefined
   38 | #define SECS_PER_HOUR (3600UL)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:68: note: this is the location of the previous definition
   68 | #define SECS_PER_HOUR ((time_t)(3600UL))
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:39: warning: "SECS_PER_DAY" redefined
   39 | #define SECS_PER_DAY  (SECS_PER_HOUR * 24L)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:69: note: this is the location of the previous definition
   69 | #define SECS_PER_DAY  ((time_t)(SECS_PER_HOUR * 24UL))
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:42: warning: "numberOfSeconds" redefined
   42 | #define numberOfSeconds(_time_) (_time_ % SECS_PER_MIN)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:76: note: this is the location of the previous definition
   76 | #define numberOfSeconds(_time_) ((_time_) % SECS_PER_MIN)
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:43: warning: "numberOfMinutes" redefined
   43 | #define numberOfMinutes(_time_) ((_time_ / SECS_PER_MIN) % SECS_PER_MIN)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:77: note: this is the location of the previous definition
   77 | #define numberOfMinutes(_time_) (((_time_) / SECS_PER_MIN) % SECS_PER_MIN)
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:44: warning: "numberOfHours" redefined
   44 | #define numberOfHours(_time_) (( _time_% SECS_PER_DAY) / SECS_PER_HOUR)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:78: note: this is the location of the previous definition
   78 | #define numberOfHours(_time_) (((_time_) % SECS_PER_DAY) / SECS_PER_HOUR)
      | 
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:45: warning: "elapsedDays" redefined
   45 | #define elapsedDays(_time_) ( _time_ / SECS_PER_DAY)
      | 
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\TimeDB.h:26,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:50,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:80: note: this is the location of the previous definition
   80 | #define elapsedDays(_time_) ((_time_) / SECS_PER_DAY)  // this is number of days since Jan 1 1970
      | 
In file included from c:\users\simon\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\assert.h:10,
                 from c:\users\simon\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\sys\reent.h:503,
                 from c:\users\simon\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\stdlib.h:18,
                 from c:\users\simon\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\cstdlib:75,
                 from c:\users\simon\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\stdlib.h:36,
                 from C:\Users\simon\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/Arduino.h:27,
                 from C:\Users\simon\AppData\Local\Temp\arduino\sketches\49451E843BE295198EC50ADC2A243A99\sketch\marquee.ino.cpp:1:
c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\WhareHauoraWiFiManager/WiFiManager.h:25:24: error: 'const char HTTP_HEAD []' redeclared as different kind of entity
   25 | const char HTTP_HEAD[] PROGMEM            = "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/><title>{v}</title>";
      |                        ^~~~~~~
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:39,
                 from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
C:\Users\simon\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:39: note: previous declaration 'HTTPMethod HTTP_HEAD'
   47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
      |                                       ^~~~~~~~~
In file included from C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\marquee.ino:28:
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:70:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   70 | char* www_username = "admin";  // User account for the Web Interface
      |                      ^~~~~~~
C:\Users\simon\Documents\Arduino\marquee-scroller-master\marquee\Settings.h:71:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   71 | char* www_password = "password";  // Password for the Web Interface
      |                      ^~~~~~~~~~

exit status 1

Compilation error: exit status 1
@Qrome
Copy link
Owner

Qrome commented Jun 22, 2023

What board did you select and what version of ESP8266 core are you using. You should be able to use latest on most library files.

Edit: looking at it closer it looks like it is probably related to your TimeDB library -- use the library manager to install that for the IDE and don't extract it manually. Give that a try.

@Stig2k
Copy link
Author

Stig2k commented Jun 22, 2023

Thanks, I've gone through the library manager and installed all four versions of Time (Michael Margolis) but get the same result each time.
I really really wish I'd kept a backup of my sketch folder before getting my new PC!

@Qrome
Copy link
Owner

Qrome commented Jun 22, 2023

The compiled binaries are available in the download as well.

Edit: Also, this line in your error makes me think you have a conflict and I don't know why you have the library installed here: c:\Users\simon\Documents\Arduino\marquee-scroller-master\libraries\Time/TimeLib.h:78: note: this is the location of the previous definition

@Stig2k
Copy link
Author

Stig2k commented Jun 22, 2023

To be honest neither do I!
I'm doing the best I can with YouTube tutorials, but this is confusing as hell for me.
However, I dug out an old Win10 laptop I have and found a backed-up arduino library directory in my One drive. Long story short, I downloaded and installed an older Arduino IDE (1.8.18) and have been able to compile and upload to a replacement WeMos board.
It's only today that I've realised that there is the sketch location parameter which I think means you can have various versions of libraries available to different projects.
Thanks for your help btw

@Stig2k
Copy link
Author

Stig2k commented Jun 23, 2023

Is it possible for me to compile a single file now that I know I'll be able to write to another WeMos in the future if I should need to? Rather than (potentially) having to track down all manor of libraries and versions of things in the future.

@MintsGit
Copy link

MintsGit commented Aug 6, 2023

did you ever fix this? I have same error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants