xoseperez / sonoffsc

Itead Studio SonoffSC custom firmware with MQTT and Domoticz support
GNU General Public License v3.0
104 stars 35 forks source link

ESP8266 compile error #34

Closed wklee666 closed 5 years ago

wklee666 commented 5 years ago

Using platformio, master branch

Compiling .pioenvs\sonoffsc\libc01\ESPAsyncWebServer\WebServer.cpp.o .piolibdeps\ESPAsyncWebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(tm)': .piolibdeps\ESPAsyncWebServer\src\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); ^ .piolibdeps\ESPAsyncWebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t)': .piolibdeps\ESPAsyncWebServer\src\WebHandlers.cpp:73:60: error: 'gmtime' was not declared in this scope return setLastModified((struct tm )gmtime(&last_modified)); ^ .piolibdeps\ESPAsyncWebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified()': .piolibdeps\ESPAsyncWebServer\src\WebHandlers.cpp:78:25: error: 'time' was not declared in this scope if(time(&last_modified) == 0) //time is not yet set ^ C*ompiling .pioenvs\sonoffsc\lib7a8\AsyncMqttClient\AsyncMqttClient.cpp.o** [.pioenvs\sonoffsc\libc01\ESPAsyncWebServer\WebHandlers.cpp.o] Error 1

Thank you for your help