ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
336 stars 93 forks source link

Can't find Preference.h ESP32 PlatformIO #127

Open mars000 opened 2 years ago

mars000 commented 2 years ago

hi I am trying to compile on PlatformIO on ESP32 I have commented in #define EZTIME_CACHE_NVS as per instructions. PlatfromIO still resulting in compile error....can't figure out why :-( I have confirmed Preferences.his in esp32 library Pls help. A noob quesiton - where do I find codes for countries/cities ?

image

ropg commented 2 years ago

I haven't done much testing with PlatformIO, just with the Arduino IDE, so can't help much there.

As for timezone names: here is a list.

MacSass commented 2 years ago

I have the same issue with ESP32 and PlatformIO - anybody been able to fix this "missing Preferences.h" error?

Gixy31 commented 2 years ago

VSCode (the PlatformIO IDE) doesn't accept conditional code before precompiled headers (such as Preferences.h). You need to modify ezTime.cpp and include all the required files without #ifdef. That means that the modified ezTime.cpp file is no more generic but specific to your platform. Another solution is to modify the VSCode configuration not to use precompiled headers, but this will force complete recompilation each time you make a modification, I didn't try that.