-->
Page 1 of 2

Errors while compiling WiFWebServer example

PostPosted: Wed Oct 17, 2018 5:16 am
by Hamdan Mahmood
Hello, when i try to compile the wifiwebserver example,given in ESP8266WiFi library,i get the following load of errors:

****************************************************************************************************************************

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:40:0,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServer.h:52:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'

WiFiClient available(uint8_t* status = NULL);

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:45:7: note: because the following virtual functions are pure within 'WiFiClient':

class WiFiClient : public Client, public SList<WiFiClient> {

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:27:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:37:22: note: virtual void Client::flush()

virtual void flush() = 0;

^

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:38:22: note: virtual void Client::stop()

virtual void stop() = 0;

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecure.h:21:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecureBearSSL.h:58:22: error: invalid abstract return type for member function 'BearSSL::WiFiClientSecure BearSSL::WiFiServerSecure::available(uint8_t*)'

WiFiClientSecure available(uint8_t* status = NULL);

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecureBearSSL.h:24:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecure.h:21,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:34:7: note: because the following virtual functions are pure within 'BearSSL::WiFiClientSecure':

class WiFiClientSecure : public WiFiClient {

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:27:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:37:22: note: virtual void Client::flush()

virtual void flush() = 0;

^

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:38:22: note: virtual void Client::stop()

virtual void stop() = 0;

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecureAxTLS.h:36:20: error: invalid abstract return type for member function 'axTLS::WiFiClientSecure axTLS::WiFiServerSecure::available(uint8_t*)'

WiFiClientSecure available(uint8_t* status = NULL);

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClientSecure.h:23:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:42,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClientSecureAxTLS.h:33:7: note: because the following virtual functions are pure within 'axTLS::WiFiClientSecure':

class WiFiClientSecure : public WiFiClient {

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:27:0,

from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:37:22: note: virtual void Client::flush()

virtual void flush() = 0;

^

C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Client.h:38:22: note: virtual void Client::stop()

virtual void stop() = 0;

^

C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino: In function 'void loop()':

WiFiWebServer:53:40: error: cannot allocate an object of abstract type 'WiFiClient'

WiFiClient client = server.available();

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:45:7: note: since type 'WiFiClient' has pure virtual functions

class WiFiClient : public Client, public SList<WiFiClient> {

^

WiFiWebServer:53:14: error: cannot declare variable 'client' to be of abstract type 'WiFiClient'

WiFiClient client = server.available();

^

In file included from C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,

from C:\Users\wwwsm\AppData\Local\Temp\arduino_modified_sketch_526765\WiFiWebServer.ino:10:

C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi\src/WiFiClient.h:45:7: note: since type 'WiFiClient' has pure virtual functions

class WiFiClient : public Client, public SList<WiFiClient> {

^

Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi
exit status 1
cannot allocate an object of abstract type 'WiFiClient'
****************************************************************************************************************************

By the way,i have tried installing arduino again, AND sqapping computers entirely... It didn't work
Help would be much, much, much appreciated.
Thank You! :ugeek: :D ;) 8-) :roll: :mrgreen: :geek: :ugeek: :idea: :| :cry:

Re: Errors while compiling WiFWebServer example

PostPosted: Wed Oct 17, 2018 11:38 am
by Pablo2048
Well, the problem is IMHO obvious - see
Code: Select allUsed: C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi

It seems like you have installed another library, named ESP8266WiFi. Try to remove this library first, or install Arduino IDE in portable version and install ESP8266 package into this installation only.

Re: Errors while compiling WiFWebServer example

PostPosted: Wed Oct 17, 2018 4:40 pm
by Hamdan Mahmood
Pablo2048 wrote:Well, the problem is IMHO obvious - see
Code: Select allUsed: C:\Users\wwwsm\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\wwwsm\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi

It seems like you have installed another library, named ESP8266WiFi. Try to remove this library first, or install Arduino IDE in portable version and install ESP8266 package into this installation only.


Unfortunately i already tried deleting that "unused" library. It seems to give the same error still?
ThankYou for quick reply! :D

Re: Errors while compiling WiFWebServer example

PostPosted: Wed Oct 17, 2018 4:44 pm
by Hamdan Mahmood
I tired that it still didn't work... :cry: The library seems to be a temporary verison of the original one that the arduino IDE makes???
Thankyou FOr the quick reply