fbiego / ESP32Time

An Arduino library for setting and retrieving internal RTC time on ESP32 boards
MIT License
222 stars 37 forks source link

error compliling #11

Closed kang2k10 closed 2 years ago

kang2k10 commented 3 years ago

Hello. With compiling example, some errors

error: variable 'tm timeinfo' has initializer but incomplete type struct tm timeinfo = rtc.getTimeStruct(); error: invalid use of incomplete type 'struct tm' struct tm timeinfo = rtc.getTimeStruct();

How fix that ?

fbiego commented 3 years ago

is this on the Arduino IDE?

kang2k10 commented 3 years ago

yes. Arduino IDE v1.8.13, esp32 core 2.0.0

fbiego commented 3 years ago

what libraries have you included in your code?

kang2k10 commented 3 years ago

only one "ESP32Time.h" i compilling example from library if i change esp32 core to 1.0.6, compilling with out errors

brownrb commented 2 years ago

add this at the top

include "time.h"

kang2k10 commented 2 years ago

Thanks. Is good solutions!