rei-vilo / DateTime_Library

RTC for MSP432 and TM4C, plus NTP for CC3200
5 stars 10 forks source link

Compile error in Energia with CC3200 #7

Closed electrophile closed 8 years ago

electrophile commented 8 years ago

Hi, I'm trying to compile one of the example codes listed with this library and I get the following error: CC3200_NTP.cpp: In function 'void loop()': CC3200_NTP.cpp:192:91: error: 'stringFormatDateTime' was not declared in this scope

I read through the documentation and there is a function called formatStringDateTime but replacing the earlier with this one still gives the same error. Any ideas?

rei-vilo commented 8 years ago

The correct function is formatDateTime2String().

stringFormatDateTime() is deprecated.

electrophile commented 8 years ago

OK. Now I get this:

\DateTime_Library\NTP_Ethernet.cpp:19:0: error: unterminated #if
 #if defined(__TM4C129XNCZAD__)

If I do terminate this in NTP_Ethernet.cpp then I get this error:

CC3200_NTP.cpp.o: In function `loop':
CC3200_NTP.cpp:(.text.loop+0xa6): undefined reference to `stringDateTime(tm)'
CC3200_NTP.cpp:(.text.loop+0xc4): undefined reference to `stringDateTime(long)'
collect2.exe: error: ld returned 1 exit status
electrophile commented 8 years ago

This seems to be working now. I changed stringFormatDateTime() to formatDateTime2String() on line 116 of the example code and used convertDateTime2String() instead of stringDateTime() on lines 110 and 113. I also downloaded a new copy of the library which seems to be updated for the new Energia beta.