Errors after updating ESPAsyncWebServer

Everything was great but I did a “pio update” to get everything up to date and now I’m getting the following errors when compiling my sketch. Any ideas what’s going on? Any help is greatly appreciated.

[Fri Jul  8 00:28:55 2016] Processing d1_mini (framework: arduino, build_flags: -Wl,-Tesp8266.flash.4m.ld, board_f_cpu: 160000000L, platform: espressif, upload_speed: 115200, board: d1_mini, upload_port
: 10.10.10.1)
--------------------------------------------------------------------------------
xtensa-lx106-elf-g++ -o .pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fd
ata-sections -DF_CPU=160000000L -D__ets__ -DICACHE_FLASH -DPLATFORMIO=021100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DESP8266_WEMOS_D1MINI -DARDUINO=20300 -U__STRICT_ANSI__ -I/Users/jjohnston/.platformio/pack
ages/framework-arduinoespressif/tools/sdk/include -I/Users/jjohnston/.platformio/packages/framework-arduinoespressif/tools/sdk/lwip/include -I.pioenvs/d1_mini/FrameworkArduino -I.pioenvs/d1_mini/Framewo
rkArduinoVariant -I.pioenvs/d1_mini/ESP8266WiFi -I.pioenvs/d1_mini/ArduinoOTA -I.pioenvs/d1_mini/ESP8266mDNS -I.pioenvs/d1_mini/ESPAsyncTCP_ID305 -I.pioenvs/d1_mini/Time_ID44 -I.pioenvs/d1_mini/ESPAsync
WebServer_ID306 -I.pioenvs/d1_mini/Hash .pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp

.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(tm*)':
.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp:67:64: error: 'strftime' was not declared in this scope
strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified);
^
.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t)':
.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp:72:60: error: 'gmtime' was not declared in this scope
return setLastModified((struct tm *)gmtime(&last_modified));
^
.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified()':
.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.cpp:77:25: error: 'time' was not declared in this scope
if(time(&last_modified) == 0) //time is not yet set
^
scons: *** [.pioenvs/d1_mini/ESPAsyncWebServer_ID306/WebHandlers.o] Error 1
========================= [ ERROR ] Took 2.91 seconds =========================

Hi @idolpx!
Could you share your project to reproduce the issue?

Yes… I’m still working on a few things but it was working fine before I updated the libraries I’m using.

Have you installed library Time (ID44) before? As a workaround, you can just rename file Time.h to _Time.h in library directory c:\Users\your_user\.platformio\lib\Time_ID44

1 Like

I have… after renaming that file it seemed to compile just fine. Thanks! :slight_smile: