Arduino: tmElements_t has not been declared

Created on 26 Apr 2015  路  5Comments  路  Source: esp8266/Arduino

I try to Compile the DS3232RTC library and receive this error:

Arduino/libraries/DS3232RTC/DS3232RTC.h:137:26: error: 'tmElements_t' has not been declared
static byte read(tmElements_t &tm);
^
Arduino/libraries/DS3232RTC/DS3232RTC.h:138:20: error: 'tmElements_t' has not been declared
byte write(tmElements_t &tm);

What can i do to fix this?

Most helpful comment

Add at the top of the sketch:

#include <Time.h>
#include <TimeLib.h>
#include <DS3232RTC.h>

All 5 comments

I am facing the same problem. Pls, tell me what have you did to fix this ?

I had this problem as well but resolved it by removing the #include and then re-including the library. After re-including the library it included both Time and Timelib header files and viola it worked. In the process of debugging this I also upgraded to Arduino IDE 1.6.8.

Add at the top of the sketch:

#include <Time.h>
#include <TimeLib.h>
#include <DS3232RTC.h>

I was facing this error too, when I had used PubSubClient library with sim800 library.
So, I included

include

include

in sim800.h file, and it started working.

Thanks a lot for your support.
Replacing with is enough (works for me at least).
Time library call TimeLib library. But you can't delete Time.h files from your Library folder. Other Library in folder Time-Master call Time.h only.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chagui- picture Chagui-  路  3Comments

rudydevolder picture rudydevolder  路  3Comments

Khorne13 picture Khorne13  路  3Comments

mechanic98 picture mechanic98  路  3Comments

treii28 picture treii28  路  3Comments