khoih-prog / ESP_WiFiManager

This is an ESP32 / ESP8266 WiFi Connection Manager with fallback web configuration portal. Use this library for configuring ESP32 (including ESP32-S2 and ESP32-C3), ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson
MIT License
371 stars 97 forks source link

PlatformIO - 'WiFiClient' does not name a type #41

Closed CrappyTan closed 3 years ago

CrappyTan commented 3 years ago

Hi,

I'm using your library in PlatformIO for the first time. Never had problem with Arduino IDE. In Platform I have library added ( khoih-prog/ESP_WiFiManager@^1.2.0),

When I try compile a black project with your includes in, I get the error below. How would I solve this?

`ompiling .pio\build\esp32doit-devkit-v1\liba2a\WiFi\WiFiGeneric.cpp.o In file included from src\WiFi.cpp:1:0: .pio/libdeps/esp32doit-devkit-v1/ESP_DoubleResetDetector/src/ESP_DoubleResetDetector.h:38:2: warning: #warning Neither EEPROM nor SPIFFS selected. Default to EEPROM [-Wcpp]

warning Neither EEPROM nor SPIFFS selected. Default to EEPROM

^ In file included from .pio/libdeps/esp32doit-devkit-v1/ESP_WifiManager/src/ESP_WiFiManager.h:51:0, from src\WiFi.cpp:2: C:/users/crispin/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.h:97:11: error: 'WiFiClient' does not name a type virtual WiFiClient client() { return _currentClient; }`

khoih-prog commented 3 years ago

Hi @CrispinP

Many people are using this ESP_WiFiManager Library without any issue in Platform.io.

Without your complete code and installation info, I can only guess that your code or installation is not correct somewhere, but I'm afraid that only you can find out where and why.

Platform.io has to do the job to correctly convert/import the already-working Arduino IDE Library into PIO environment.

If the problem persists, I suggest you post an issue onPlatform.io Forum to ask for support from many willing-to-help experts there as I don't have PIO's good experience enough to identify why you have the issue.

If you find out and solve the issue, please post your experience back here to help other PIO users in the future.

Good luck to your new project,