Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By ulegan
#23068
Code: Select all#include <time.h>

struct tm* ti;
time_t testTime = 123456789;

void setup() {
  Serial.begin( 115200 );
  ti = localtime( &testTime );
  Serial.print( ti->tm_mday );
}

void loop() {  }


This code compiles and works with the old 1.6.1 github download.
Compiling with arduino 1.6.5 and the current 1.6.4-637-g8cd3697 plugin
leads to:
undefined reference to 'localtime'
while linking.
What went wrong?
User avatar
By ulegan
#23146 tried it with AVR too.
It doesn't even find time.h then.
It was working with the old ESP-compiler. <time.h> exists in the current version. But linking gives the error-message.
Tried it without the localtime(), have more problems now. Code compiles but crashes with wdt-timeout...
Seems there are even more problems. I return to the old version for now.