You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino: In function 'void loop()':
C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:210:43: error: invalid new-expression of abstract class type 'EthernetServer'
ethernetServer = new EthernetServer(80); //Instantiate the web server. Use port 80
^
In file included from C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:52:
c:\Users\seans\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:254:7: note: because the following virtual functions are pure within 'EthernetServer':
class EthernetServer : public Server {
^~~~~~~~~~~~~~
In file included from C:\Users\seans\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Arduino.h:182,
from C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:16:
C:\Users\seans\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Server.h:28:18: note: 'virtual void Server::begin(uint16_t)'
virtual void begin(uint16_t port=0) =0;
^~~~~
Multiple libraries were found for "Ethernet.h"
Used: C:\Users\seans\Documents\Arduino\libraries\Ethernet
Not used: C:\Users\seans\AppData\Local\Arduino15\libraries\Ethernet
Not used: C:\Users\seans\Documents\Arduino\libraries\UIPEthernet
Not used: C:\Users\seans\Documents\Arduino\libraries\EthernetENC
exit status 1
Compilation error: invalid new-expression of abstract class type 'EthernetServer'
The text was updated successfully, but these errors were encountered:
The compilation error actually comes from the Arduino Ethernet Library and is discussed in this issue. The solution is to patch Server.h. Replace C:\Users\<Your User>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32\Server.h with the modified copy here and all will be well.
I will pin this issue to make it easier to find.
Best wishes,
Paul
PaulZC
changed the title
Compilation error
Compilation error - Arduino Ethernet Library (EthernetServer) on ESP32
Feb 5, 2024
PaulZC
changed the title
Compilation error - Arduino Ethernet Library (EthernetServer) on ESP32
Example compilation error - Arduino Ethernet Library (EthernetServer) on ESP32
Feb 5, 2024
C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino: In function 'void loop()':
C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:210:43: error: invalid new-expression of abstract class type 'EthernetServer'
ethernetServer = new EthernetServer(80); //Instantiate the web server. Use port 80
^
In file included from C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:52:
c:\Users\seans\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:254:7: note: because the following virtual functions are pure within 'EthernetServer':
class EthernetServer : public Server {
^~~~~~~~~~~~~~
In file included from C:\Users\seans\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Arduino.h:182,
from C:\Users\seans\Documents\Arduino\libraries\SparkFun_WebServer_ESP32_W5500\examples\Example1_AsyncWebServer\Example1_AsyncWebServer.ino:16:
C:\Users\seans\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Server.h:28:18: note: 'virtual void Server::begin(uint16_t)'
virtual void begin(uint16_t port=0) =0;
^~~~~
Multiple libraries were found for "Ethernet.h"
Used: C:\Users\seans\Documents\Arduino\libraries\Ethernet
Not used: C:\Users\seans\AppData\Local\Arduino15\libraries\Ethernet
Not used: C:\Users\seans\Documents\Arduino\libraries\UIPEthernet
Not used: C:\Users\seans\Documents\Arduino\libraries\EthernetENC
exit status 1
Compilation error: invalid new-expression of abstract class type 'EthernetServer'
The text was updated successfully, but these errors were encountered: