Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yltsa opened this issue Feb 11, 2025 · 8 comments

Comments

@yltsa
Copy link

yltsa commented Feb 11, 2025

Hi,

I try to compile

examples/Modules/Base_PoE/LAN_W5500/WebServer/WebServer.ino Arduino example.

There comes always this error:

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

The board is CoreS3,

@Tinyu-Zhao
Copy link
Collaborator

Don't forget to provide your code.

@yltsa
Copy link
Author

yltsa commented Feb 12, 2025

@Tinyu-Zhao
Copy link
Collaborator

Tinyu-Zhao commented Feb 12, 2025

This is the library file of the M5Core generation host(M5Fire, M5Basic, M5Gray), you are sure that this is the program that compiles the M5Core S3 host, and I tested the compilation without any problems.

Image

@yltsa
Copy link
Author

yltsa commented Feb 12, 2025

I have this error:

Image

@Tinyu-Zhao
Copy link
Collaborator

Can you provide all the logs?

Image

@yltsa
Copy link
Author

yltsa commented Feb 12, 2025

@lovyan03
Copy link
Contributor

lovyan03 commented Feb 17, 2025

hello, @yltsa
Perhaps you are mixing the following two?
If you do, a conflict will occur and the compile will not work.

// #include <M5Stack.h>    // <- NO NEED THIS.
#include <M5CoreS3.h> // <- need for CoreS3

Also, the argument to the begin function will probably not be necessary.

//  M5.begin(true, false, true);  // <- NG
  M5.begin();                      // <- OK

@Tinyu-Zhao
Copy link
Collaborator

As Lovyan said, and these pins don't work with the M5CoreS3 either, Only work for M5Fire, M5Basic, M5Gray

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

No branches or pull requests

3 participants