I have created 2 simple projects from sratch, both with the same platform and board, but different framework (android and espidf)
Using the librarie manager I installed the “PubSubClient” to both projects, and changed the “platformio.ini” file.
The “android” project builds ok, but the “espidf” project fails with the following message:
Compiling .pio\build\esp32dev\esp-idf\src\main.c.o
src\main.c:1:10: fatal error: PubSubClient.h: No such file or directory
**********************************************************************
* Looking for PubSubClient.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:PubSubClient.h"
* Web > https://platformio.org/lib/search?query=header:PubSubClient.h
*
**********************************************************************
#include <PubSubClient.h>
^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\esp32dev\esp-idf\app_trace\app_trace_util.c.o
Compiling .pio\build\esp32dev\esp-idf\app_trace\host_file_io.c.o
*** [.pio\build\esp32dev\esp-idf\src\main.c.o] Error 1
Compiling .pio\build\esp32dev\esp-idf\app_trace\gcov\gcov_rtio.c.o
The platformio.ini file looks as follows:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
lib_deps =
# Using a library name
PubSubClient
and the source code as follows:
#include <PubSubClient.h>
void app_main() {}
Does anyone have an idea how I can solve the problem with the espidf project?