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

Conflicts with Webserver.h on some HTTP declarations #2

Closed
2 of 5 tasks
Bjack795 opened this issue Dec 1, 2018 · 1 comment
Closed
2 of 5 tasks

Conflicts with Webserver.h on some HTTP declarations #2

Bjack795 opened this issue Dec 1, 2018 · 1 comment

Comments

@Bjack795
Copy link

Bjack795 commented Dec 1, 2018

Basic Infos

Hardware

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • Other (Wemos D32 pro)

Description

There are conflicts between this library and the Webserver.h library.
The compiler tells me that there are some declarations done by both about the HTTP parts of the code.
I have to use both libraries since I have two sublibraries referring one to ESP32Webserver.h and the other to Webserver.h.
Is there any chance to solve this incompatibility?

Debug Messages

  • using typedef-name 'HTTPMethod' after 'enum'?
    enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };

  • 'HTTPMethod' has a previous declaration

  • redeclaration of 'HTTP_ANY'
    enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };

  • previous declaration 'HTTPMethod HTTP_ANY'

  • redeclaration of 'HTTP_GET'

  • previous declaration 'HTTPMethod HTTP_GET'

Etc...

@Pedroalbuquerque
Copy link
Owner

Hi Bjack795,

this library can be found on ivan repository, so maybe he can provider better help from the inside of the library.

name=ESP32WebServer
version=1.0
author=Ivan Grokhotkov
maintainer=Ivan Grokhtkov ivan@ESP32.com
sentence=Simple web server library
paragraph=The library supports HTTP GET and POST requests, provides argument parsing, handles one client at a time.
category=Communication
url=
architectures=ESP32

anyway I have faced similar problems as you described, and my solution was to change the #include to use a single library, not both.

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

2 participants