Closed uliatgithub closed 4 years ago
Hi @uliatgithub
ESP32's DNSServer is a inherent part of ESP32 board package, and must have been installed automatically.
I think you either didn't install correctly or just forgot to install ESP32 board package to PIO.
Start from the simplest ESP32 sketch and identify the issue. It's also better to ask in PIO forum how to install correctly.
In order to run the WifiManager in Platformio various libraries need to be included. In my PIO installation DNSServer functions/methods are not found when the compiled parts are going to be linked together.
Building in release mode Linking .pio\build\pico32\firmware.elf .pio\build\pico32\src\main.cpp.o:(.literal._ZN15ESP_WiFiManager17setupConfigPortalEv+0x64): undefined reference to
DNSServer::DNSServer()' .pio\build\pico32\src\main.cpp.o:(.literal._ZN15ESP_WiFiManager17setupConfigPortalEv+0x68): undefined reference toDNSServer::setErrorReplyCode(DNSReplyCode const&)' .pio\build\pico32\src\main.cpp.o:(.literal._ZN15ESP_WiFiManager17setupConfigPortalEv+0x6c): undefined reference to
DNSServer::start(unsigned short const&, String const&, IPAddress const&)' .pio\build\pico32\src\main.cpp.o:(.literal._ZN15ESPWiFiManager17startConfigPortalEPKcS1+0x24): undefined reference toDNSServer::stop()' .pio\build\pico32\src\main.cpp.o:(.literal._ZN15ESP_WiFiManager17startConfigPortalEPKcS1_+0x28): undefined reference to
DNSServer::processNextRequest()' .pio\build\pico32\src\main.cpp.o: In functionESP_WiFiManager::setupConfigPortal()': C:\Users\Uli\Documents\PlatformIO\Projects\ESP32_Wifimanager_Testing/.pio\libdeps\pico32\ESP_WifiManager\src/ESP_WiFiManager-Impl.h:1457: undefined reference to
DNSServer::DNSServer()'C:\Users\Uli\Documents\PlatformIO\Projects\ESP32_Wifimanager_Testing/.pio\libdeps\pico32\ESP_WifiManager\src/ESP_WiFiManager-Impl.h:1457: undefined reference to
DNSServer::setErrorReplyCode(DNSReplyCode const&)' C:\Users\Uli\Documents\PlatformIO\Projects\ESP32_Wifimanager_Testing/.pio\libdeps\pico32\ESP_WifiManager\src/ESP_WiFiManager-Impl.h:1457: undefined reference to
DNSServer::start(unsigned short const&, String const&, IPAddress const&)' .pio\build\pico32\src\main.cpp.o: In functionESP_WiFiManager::startConfigPortal(char const*, char const*)': C:\Users\Uli\Documents\PlatformIO\Projects\ESP32_Wifimanager_Testing/.pio\libdeps\pico32\ESP_WifiManager\src/ESP_WiFiManager-Impl.h:1457: undefined reference to
DNSServer::stop()' C:\Users\Uli\Documents\PlatformIO\Projects\ESP32_Wifimanager_Testing/.pio\libdeps\pico32\ESP_WifiManager\src/ESP_WiFiManager-Impl.h:1457: undefined reference toDNSServer::processNextRequest()' collect2.exe: error: ld returned 1 exit status *** [.pio\build\pico32\firmware.elf] Error 1
My assumption is that I have not included the DNSServer lib correctly into PIO. It would help to see how it has to be defined in platformio.ini file, but the link to the example file lead to a 404 message.
Thx