ThingPulse / esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
https://thingpulse.com/product/esp8266-wifi-color-display-kit-2-4/
MIT License
566 stars 221 forks source link

undefined gmtime #78

Closed fred1337 closed 6 years ago

fred1337 commented 6 years ago

Hello,

I have this error when compiling:

Archiving built core (caching) in: /tmp/arduino_cache_428210/core/core_esp8266_esp8266_d1_mini_CpuFrequency_80,UploadSpeed_921600,FlashSize_4M3M_210d5cac6c65c7c358fe294582e4bdc0.a
sketch/esp8266-weather-station-color.ino.cpp.o: In function `drawAbout()':
/Documents/esp8266-weather-station-color/esp8266-weather-station-color.ino:610: undefined reference to `gmtime'
sketch/esp8266-weather-station-color.ino.cpp.o: In function `getTime(long*)':
/Documents/esp8266-weather-station-color/esp8266-weather-station-color.ino:610: undefined reference to `gmtime'
collect2: error: ld returned 1 exit status
exit status 1

Weather Station Color version

I used the latest git version.

Hardware

I run on custom hardware.

marcelstoer commented 6 years ago

This must be an issue with your local ESP8266 Arduino setup and not with this software. gmtime is defined in time.h: https://github.com/esp8266/Arduino/blob/master/tools/sdk/libc/xtensa-lx106-elf/include/time.h#L57

mattie47 commented 6 years ago

Thanks for pointing that out @marcelstoer.

I had the exact same issue. The fix for me was to update the esp8266 board package in Arduino IDE:

image

Thanks,

Matt