Closed MudassirTufail closed 1 year ago
This occurs when PIO Library Finder does not select the appropriate include headers; without lib_ldf_mode
or no deep
/deep+
, PIO obtains the necessary include headers resulting from static code analysis but does not evaluate the preprocessor directives recursively. Therefore, source files based on all the include headers detected by PIO's pre-build scan are targets for compilation. This is why you got an error trying to compile AutoConnectAux.cpp even though your build target is
To fix, specify lib_ldf_mode = deep
or deep+
with pio.ini
.
Since this instruction way is missing from the description of the AutoConnect documentation, I will add it.
Thank You I used lib_ldf_mode = deep+ in platform.ini file and that worked.
Hello I followed the instructions on "Reducing Binary Size" at https://hieromon.github.io/AutoConnect/basicusage.html and switched to using #include, but running into errors below: [no errors as I switch back to using #include ]. Could you please advise, thank you
Compiling .pio\build\esp32doit-espduino\lib1c8\AutoConnect\AutoConnectUpdate.cpp.o .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectOTA.cpp:19:10: fatal error: Update.h: No such file or directory
include
compilation terminated. In file included from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectUpdate.cpp:16: .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectUpdate.h:44:10: fatal error: HTTPClient.h: No such file or directory
include
compilation terminated. [.pio\build\esp32doit-espduino\lib1c8\AutoConnect\AutoConnectOTA.cpp.o] Error 1 [.pio\build\esp32doit-espduino\lib1c8\AutoConnect\AutoConnectUpdate.cpp.o] Error 1 In file included from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectExt.hpp:24, from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectConfigAux.h:20, from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectConfigAux.cpp:14: .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectUpdate.h:44:10: fatal error: HTTPClient.h: No such file or directory
include
In file included from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectExt.hpp:24, from .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectAux.cpp:10: .pio/libdeps/esp32doit-espduino/AutoConnect/src/AutoConnectUpdate.h:44:10: fatal error: HTTPClient.h: No such file or directory
include
compilation terminated. compilation terminated. [.pio\build\esp32doit-espduino\lib1c8\AutoConnect\AutoConnectAux.cpp.o] Error 1 [.pio\build\esp32doit-espduino\lib1c8\AutoConnect\AutoConnectConfigAux.cpp.o] Error 1 ================================================================================== [FAILED] Took 21.87 seconds ==================================================================================