I’m doing some experiments with Blynk and an ESP8266_01 board, I have compiled ESP8266_Standalone example without errors, but if I try to compile ESP8266_Standalone_SSL, compilation ends with a series of errors.
I’m using latest 0.5.3 library version, I can not figure out where the problem is.
xtensa-lx106-elf-g++ -o .pioenvs\esp01_1m\src\main.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fdata-sections -Wall -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DPLATFORMIO=30600 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01 -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_ESP01_1M\" -DLWIP_OPEN_SRC -U__STRICT_ANSI__ -Isrc -I.piolibdeps\Time_ID44 -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src -I.piolibdeps\Blynk_ID415\src -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\tools\sdk\libc\xtensa-lx106-elf\include -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\cores\esp8266 -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include -IC:\Users\paolo\.platformio\packages\framework-arduinoespressif8266\variants\generic src\main.cpp
In file included from src\main.cpp:37:0:
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h: In member function 'bool BlynkArduinoClientSecure<Client>::connect()':
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:70:34: error: there are no arguments to 'time' that depend on a template parameter, so a declaration of 'time' must be available [-fpermissive]
time_t now = time(nullptr);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:70:34: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:73:29: error: there are no arguments to 'time' that depend on a template parameter, so a declaration of 'time' must be available [-fpermissive]
now = time(nullptr);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:76:33: error: there are no arguments to 'gmtime_r' that depend on a template parameter, so a declaration of 'gmtime_r' must be available [-fpermissive]
gmtime_r(&now, &timeinfo);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:77:43: error: there are no arguments to 'asctime' that depend on a template parameter, so a declaration of 'asctime' must be available [-fpermissive]
String ntpTime = asctime(&timeinfo);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h: In instantiation of 'bool BlynkArduinoClientSecure<Client>::connect() [with Client = WiFiClientSecure]':
.piolibdeps\Blynk_ID415\src/Blynk/BlynkProtocol.h:203:17: required from 'bool BlynkProtocol<Transp>::run(bool) [with Transp = BlynkArduinoClientSecure<WiFiClientSecure>]'
src\main.cpp:58:13: required from here
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:70:34: error: 'time' was not declared in this scope
time_t now = time(nullptr);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:73:29: error: 'time' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
now = time(nullptr);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:70:34: note: 'time' declared here, later in the translation unit
time_t now = time(nullptr);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:75:19: error: 'tm timeinfo' has incomplete type
struct tm timeinfo;
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:76:33: error: 'gmtime_r' was not declared in this scope
gmtime_r(&now, &timeinfo);
^
.piolibdeps\Blynk_ID415\src/BlynkSimpleEsp8266_SSL.h:77:43: error: 'asctime' was not declared in this scope
String ntpTime = asctime(&timeinfo);
^
*** [.pioenvs\esp01_1m\src\main.cpp.o] Error 1