SanteriLindfors / WiFiProvisioner

An easy-to-use, customizable WiFi provisioning library for ESP32 devices, featuring a modern captive portal and user-friendly interface.
MIT License
13 stars 6 forks source link

Build errors when the sketch already uses ESP Async WebServer #2

Open ghost opened 9 months ago

ghost commented 9 months ago

I want to try your library, but my quite large app already uses ESP Async WebServer and when I try to build I get errors due to a conflict for already defined constants:

In file included from /home/mark/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/HTTP_Method.h:4,
                 from /home/mark/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.h:30,
                 from .pio/libdeps/Aphrodite/WiFiProvisioner/src/WiFiProvisioner.h:7,
                 from include/network.h:5,
                 from src/webapp.cpp:23:
/home/mark/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/nghttp/port/include/http_parser.h:95:6: error: 'HTTP_DELETE' conflicts with a previous declaration
   XX(0,  DELETE,      DELETE)       \
      ^
/home/mark/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/nghttp/port/include/http_parser.h:138:45: note: in definition of macro 'XX'
 #define XX(num, name, string) HTTP_##name = num,
                                             ^~~
/home/mark/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/nghttp/port/include/http_parser.h:139:3: note: in expansion of macro 'HTTP_METHOD_MAP'
   HTTP_METHOD_MAP(XX)
   ^~~~~~~~~~~~~~~
In file included from include/webapp.h:9,
                 from src/webapp.cpp:1:
.pio/libdeps/Aphrodite/ESP Async WebServer@src-8a740033305cb1c99d89b522d725653f/src/ESPAsyncWebServer.h:64:3: note: previous declaration 'WebRequestMethod HTTP_DELETE'
   HTTP_DELETE  = 0b00000100,
   ^~~~~~~~~~~

This happens for the following items:

Is there a way to make the two libraries work together?