Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

cannot declare variable 'server' to be of abstract type 'EthernetServer' (ESP32) #32

Closed
Kameeno opened this issue Aug 2, 2018 · 2 comments

Comments

@Kameeno
Copy link

Kameeno commented Aug 2, 2018

Hi!, i'm on platformIO and i'm finding any way to get compiled correctly when i declare EthernetServer server(80);
src/main.cpp:5:16: error: cannot declare variable 'server' to be of abstract type 'EthernetServer'

#include <Arduino.h>
#include <Ethernet2.h>


EthernetServer server(80);

void setup() {

}

void loop() {
}

there's a way to make it run ?
instead on another pc with linux, the same zipped project is working, can you help me :( ?

@nnn112358
Copy link

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

@ladyada
Copy link
Member

ladyada commented Jan 7, 2019

This library is no longer going to be used, since the official Arduino library has been updated and works great https://github.com/arduino-libraries/Ethernet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants