WiFiManager: Can't build the library, after migrating to ESP32

Hi, I can’t manage to build the library, after I want to switch to ESP32. Everything worked well with ESP8266, therefore I’m not attaching any code of mine.

I’m using the library cloned, and as a submodule, and I’m up-to-date to master branch. I’m developing in PlatformIO.

I have a lot of errors, but at first sight all of them can be traced back to the first one, which is:

In file included from lib/_WiFiManager/WiFiManager.cpp:13:
lib/_WiFiManager/WiFiManager.h:436:30: error: 'WebServer' does not name a type; did you mean 'DNSServer'?

Relevant code (WiFiManager.h):

    #if defined(ESP32) && defined(WM_WEBSERVERSHIM)
        using WM_WebServer = WebServer;
    #else
        using WM_WebServer = ESP8266WebServer;
    #endif

Thank you so much for your help.

About this issue

Most upvoted comments

are you including wifimanager.h or just using lib_deps? Someone posted a similar issue before and it was a pio issue…

could be ldf mode or not including proper deps

without any information no idea