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

Issue compiling on ESP32 with latest ESP32 library (2.0.6) #176

Open
wrybread opened this issue Jan 1, 2023 · 0 comments
Open

Issue compiling on ESP32 with latest ESP32 library (2.0.6) #176

wrybread opened this issue Jan 1, 2023 · 0 comments

Comments

@wrybread
Copy link

wrybread commented Jan 1, 2023

After updating my ESP32 library for the Arduino IDE (using Windows) from version 1.0.6 to 2.0.6 (latest), I could no longer compile, and I received cryptic error messages that pointed to another library, esp32time. Unfortunately I didn't save the error messages, but I can revert my changes below if they're needed.

After doing some research I found that Time.h may get used instead of time.h on Windows, since it's a case insensitive OS.

Inisde this timezone library's folder I found Time.h and Time.cpp, and I renamed them to Time2.h and Time2.cpp and then my script would compile.

Interestingly the timezone library seems to still be working fine. I'm able to set the timezone, and it translates GMT time to my local timezone. If there's a problem I haven't found it yet.

Also in TimeLib.h I found this note:

// This ugly hack allows us to define C++ overloaded functions, when included
// from within an extern "C", as newlib's sys/stat.h does.  Actually it is
// intended to include "time.h" from the C library (on ARM, but AVR does not
// have that file at all).  On Mac and Windows, the compiler will find this
// "Time.h" instead of the C library "time.h", so we may cause other weird
// and unpredictable effects by conflicting with the C library header "time.h",
// but at least this hack lets us define C++ functions as intended.  Hopefully
// nothing too terrible will result from overriding the C library header?!

Related?

Anyway, I'm wondering if I've likely broken anything with this "fix"? And is there a better fix I could apply to get this compile on ESP32?

Thanks for any help.

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

1 participant