-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
PlatformIO build failed. v.2.3.1 #48
Comments
I fixed for missing time.h header file. Please update the library. |
PlatformIO still see old version 2.3.1 (issue platformio/platformio-api#23). |
Actually time.h is in the core library. Any third party libraries contained time.h? Check and search third party lib for time.h, temporary remove it or update platformio again. |
The code that you've got the error is just for get NTP server time. configTime(3 * 3600, 0, "pool.ntp.org", "time.nist.gov");
time_t now = time(nullptr);
while (now < 8 * 3600 * 2)
{
delay(100);
now = time(nullptr);
}
struct tm timeinfo;
gmtime_r(&now, &timeinfo); This issue caused by duplicate time.h from other libraries. Please read this and this. |
Thank you. The problem was with https://github.com/PaulStoffregen/Time library. It has Time.h. |
I also don't understand why well known dev don't care about naming. |
Describe the bug
C:\Users\user.platformio\lib\Firebase ESP8266 Client_ID6247\src\FirebaseESP8266.cpp: In member function 'void FirebaseESP8266::setClock()':
C:\Users\user.platformio\lib\Firebase ESP8266 Client_ID6247\src\FirebaseESP8266.cpp:4885:30: error: 'time' was not declared in this scope
time_t now = time(nullptr);
^
C:\Users\user.platformio\lib\Firebase ESP8266 Client_ID6247\src\FirebaseESP8266.cpp:4899:15: error: aggregate 'tm timeinfo' has incomplete type and cannot be defined
struct tm timeinfo;
^
C:\Users\user.platformio\lib\Firebase ESP8266 Client_ID6247\src\FirebaseESP8266.cpp:4900:29: error: 'gmtime_r' was not declared in this scope
gmtime_r(&now, &timeinfo);
^
*** [.pio\build\esp12e\lib573\Firebase ESP8266 Client_ID6247\FirebaseESP8266.cpp.o] Error 1
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Successful build
IDE and its version:
ESP8266 Arduino Core SDK version
Additional context
If I downgrade to 2.3.0 - no build errors.
The text was updated successfully, but these errors were encountered: