Esp-IDF won't build because of failing includes; no such file or directory

KoenAec
Posts: 1
Joined: Thu Apr 06, 2023 8:57 am

Esp-IDF won't build because of failing includes; no such file or directory

Postby KoenAec » Thu Apr 06, 2023 9:01 am

... /mqtt/mqttClient.c:10:10: fatal error: esp_netif.h: No such file or directory

This happens for a few, but not all, components I try to include into my project.
I'm quite new to this, but my understanding is that these components reside in a folder structure in my esp-idf folders.
Some components in these folders are included just fine, but some just refuse to build until I fix it like this in my Cmakelists.txt:

INCLUDE_DIRS "." "include" "${IDF_PATH}/components/nvs_flash/include" "${IDF_PATH}/components/esp_partition/include" "${IDF_PATH}/components/esp_event/include"

Could someone explain me why I have to do this for some components, and how I am supposed to do this the proper way?
Perhaps through the project's top level CMakelists.txt?

Who is online

Users browsing this forum: No registered users and 96 guests