Compilation error with ESP8266WiFi.h library
Posted: Wed Nov 18, 2020 11:08 pm
Using a ESP8266 development board like this :
on the latest IDE platform (1.8.13) with the latest board manager (2.7.4), I obtain a compilation error from sketches that used to work quite well on earlier versions of IDE and board mgr.
The compilation error is :
In file included from C:\Users\..........\ARDUINO-ESP8266\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from C:\Users\..........\ARDUINO-ESP8266\Arduino\tmp11\tmp11.ino:3:
C:\Users\...........\ARDUINO-ESP8266\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:89:7: error: 'int WiFiClient::availableForWrite()' marked override, but does not override
int availableForWrite() override;
......^
The (simple) test code in the tmp11.ino sketch (please note that other more elaborated sketches where ESP8266WiFi.h is involved produce the same issue) is :
Any idea ?
Thx
on the latest IDE platform (1.8.13) with the latest board manager (2.7.4), I obtain a compilation error from sketches that used to work quite well on earlier versions of IDE and board mgr.
The compilation error is :
In file included from C:\Users\..........\ARDUINO-ESP8266\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from C:\Users\..........\ARDUINO-ESP8266\Arduino\tmp11\tmp11.ino:3:
C:\Users\...........\ARDUINO-ESP8266\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:89:7: error: 'int WiFiClient::availableForWrite()' marked override, but does not override
int availableForWrite() override;
......^
The (simple) test code in the tmp11.ino sketch (please note that other more elaborated sketches where ESP8266WiFi.h is involved produce the same issue) is :
Code: Select all
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char* ssid = "MySSID";
const char* password = "12345678";
ESP8266WebServer server(80);
//
void handleRoot() {
server.send(200, "text/plain", "hello from esp8266!");
}
void setup(void){
Serial.begin(9600);
WiFi.disconnect(true);
delay(1000);
WiFi.mode(WIFI_AP);
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
Serial.print("HotSpt IP:");
Serial.println(myIP);
server.on("/", handleRoot);
server.begin();
Serial.println("HTTP server started");
}
void loop(void){
server.handleClient(); //Handle client requests
}
Any idea ?
Thx