arhi / EthernetSPI2

Allow ESP32-CAM module to talk to W5500 Ethernet module trough HSPI as SPI (VSPI) pins are used to connect the camera module
55 stars 14 forks source link

cant compile (help me) #5

Open kPlusPlus opened 1 year ago

kPlusPlus commented 1 year ago

D:\Project\Camera\ESP32EthCamera\ESP32EthCamera.ino:79:16: error: cannot declare variable 'server' to be of abstract type 'EthernetServer' EthernetServer server(80); ^ In file included from D:\Project\Camera\ESP32EthCamera\ESP32EthCamera.ino:37:0: c:\Users\kresi\OneDrive\Dokumenti\Arduino\libraries\EthernetSPI2\src/EthernetSPI2.h:253:7: note: because the following virtual functions are pure within 'EthernetServer': class EthernetServer : public Server { ^ In file included from C:\Users\kresi\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:152:0, from C:\Users\kresi\AppData\Local\Temp\arduino\sketches\FE5914CB5C47106DDEA3D21F90EA3FDB\sketch\ESP32EthCamera.ino.cpp:1: C:\Users\kresi\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Server.h:28:18: note: virtual void Server::begin(uint16_t) virtual void begin(uint16_t port=0) =0; ^

exit status 1

Compilation error: cannot declare variable 'server' to be of abstract type 'EthernetServer'

techscapades commented 10 months ago

problem is solved here: https://github.com/adafruit/Ethernet2/issues/32

nnn112358 commented on Sep 19, 2018 There is no problem with this.

If new arduino esp32 or make error, need go to c:\Program Files (x86)\Arduino\hardware\espressif\arduino-esp32\cores\esp32\Server.h Change virtual void begin(uint16_t port = 0) = 0; to virtual void begin() = 0;

https://github.com/m5stack/M5Stack/blob/master/examples/Modules/W5500/WebServer/WebServer.ino

For me the location of this file was in: C:\Users{your_user}\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32\Server.h

reopened arduino after opening the file and all was good, hope this helps mate :)