WiFiManager icon indicating copy to clipboard operation
WiFiManager copied to clipboard

Build error for ESP32 in VSCode/PIO

Open adbrimhall opened this issue 1 year ago • 12 comments

I get the following build error in VSCode using PlatformIO.

In file included from .pio/libdeps/esp32dev/WiFiManager/WiFiManager.cpp:13: .pio/libdeps/esp32dev/WiFiManager/WiFiManager.h:99:14: fatal error: Update.h: No such file or directory

my platformio.ini is using the git library: lib_deps = https://github.com/tzapu/WiFiManager.git

If I change my platformio.ini to this instead: lib_deps = WiFiManager

I get a different build error:

In file included from .pio/libdeps/esp32dev/WiFiManager/WiFiManager.cpp:13: .pio/libdeps/esp32dev/WiFiManager/WiFiManager.h:16:10: fatal error: ESP8266WiFi.h: No such file or directory

I am new to VSCode and PlatformIO. Not sure how to proceed. Any ideas?

adbrimhall avatar Jul 15 '22 18:07 adbrimhall

i had the same issue , tried with arduino ide and got it built! i think it might be a platformio issue looking forward to get it solved

ahmedtariqh avatar Jul 16 '22 21:07 ahmedtariqh

ouch, i'm not alone. is downgrading platformio a solution for this?

veitk avatar Jul 21 '22 13:07 veitk

Not sure, will it build for esp8266?

tablatronix avatar Jul 21 '22 14:07 tablatronix

sorry in my case it was a different library which caused unexpected trouble.

veitk avatar Jul 21 '22 15:07 veitk

I'm also having this issue, I haven't been able to work out any solutions yet. I'm unable to use the arduino ide for this project

Kuuchuu avatar Jul 31 '22 17:07 Kuuchuu

Same issue. Looks like including just WiFiManager in lib_deps downloads outdated version of WiFiManager.h. If i specify full git repo path https://github.com/tzapu/WiFiManager.git, it loads the lib fine without editor error, but fails horribly during the build with bunch of errors in PIO toolchain shared files.

stsvilik avatar Aug 06 '22 21:08 stsvilik

It would seem I'm having the same issue:

In file included from .pio/libdeps/esp32doit-devkit-v1/WiFiManager/WiFiManager.cpp:13: .pio/libdeps/esp32doit-devkit-v1/WiFiManager/WiFiManager.h:99:14: fatal error: Update.h: No such file or directory

Lib Deps below: lib_deps = ;WiFiManager https://github.com/tzapu/WiFiManager.git

VSCode 1.7.0 Platformio 6.1.3

CharlesPavlov avatar Aug 08 '22 19:08 CharlesPavlov

Same here. Any advice?

sauvant avatar Aug 22 '22 07:08 sauvant

I adviced myself ;-)

lib_ldf_mode = deep+

in platformio.ini solved the issue for me.

sauvant avatar Aug 22 '22 07:08 sauvant

Yeah i have no idea why it does that, it seems like a bug in pio or with certain branches

tablatronix avatar Aug 22 '22 18:08 tablatronix

I guess people (Like me) install it from the PlatformIo UI, and that would explain why its not working

grafik

kinsi55 avatar Aug 25 '22 01:08 kinsi55

Hmm maybe pio manager doesn't support dev versions

tablatronix avatar Aug 25 '22 03:08 tablatronix

I solve it by adding this in the main.cpp : #include <Update.h> #include <WebServer.h> #include <DNSServer.h>

ahmedreghini avatar Nov 17 '22 14:11 ahmedreghini

I had in platformio.ini this: lib_ldf_mode = deep causing errors. I added lib_ldf_mode = deep+ and worked fine.

rossog93 avatar Dec 29 '22 02:12 rossog93

I guess people (Like me) install it from the PlatformIo UI, and that would explain why its not working

grafik

Thank you for the hint, I reference the github link instead and it worked straight away.

rmhomecouk avatar Feb 02 '23 19:02 rmhomecouk

Yeah you have to specify in ini file, platformio lib does not support non release versions or at least I never figured out how to do it. I am going to make this release soon and stop using prereleases

tablatronix avatar Feb 03 '23 02:02 tablatronix

I solve it by adding this in the main.cpp : #include <Update.h> #include <WebServer.h> #include <DNSServer.h>

I know this is an old comment on a closed issue but, I found that I also got those kinds of errors ( related to update.h etc). The errors went away, without having to directly include the headers mentioned in the error message, when I added #include <WiFiManager.h> to any of my source files. Not sure if this is a common platforio issue or specific to this library.

jfujitani avatar Jul 08 '23 14:07 jfujitani

https://github.com/tzapu/WiFiManager.git

Using complete URL instead of 'taps/WiFiManager'in platformio.ini works like a charm. Thanks

fg1998 avatar Oct 21 '23 15:10 fg1998

It is the same issue here. It seems that VS code is looking to esp8266wifi.h ????

In file included from src\main.cpp:2:0: .pio\libdeps\esp32dev\WiFiManager/WiFimanager.h:16:25: fatal error: ESP8266WiFi.h: No such file or directory

Help needed please.

PhilippeLRQ avatar Nov 08 '23 21:11 PhilippeLRQ