Custom Component - referencing esp-idf component headers

choyster
Posts: 2
Joined: Fri Aug 09, 2019 1:38 pm

Custom Component - referencing esp-idf component headers

Postby choyster » Fri Aug 09, 2019 1:49 pm

Hi all,

I am creating a custom component with references to esp-idf headers such as this:

#include "esp_http_client.h"

But I continue to get the following error when I compile:

fatal error: esp_http_client.h: No such file or directory

Any tips/pointers would be greatly appreciated.

Thanks,
Ambrose

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Custom Component - referencing esp-idf component headers

Postby ESP_Angus » Mon Aug 12, 2019 12:19 am

Hi Ambrose,

Are you creating a component using the new CMake build system? In the CMake-based build system, components need to specifically name which other components they depend on - so in this case the component needs to say that it REQUIRES esp_http_client component.

See here for full details:
https://docs.espressif.com/projects/esp ... quirements

choyster
Posts: 2
Joined: Fri Aug 09, 2019 1:38 pm

Re: Custom Component - referencing esp-idf component headers

Postby choyster » Mon Aug 12, 2019 3:50 pm

I've added PRIV_REQUIRES mbedtls lwip esp-tls tcp_transport spiffs, should I be adding esp_http_client to here as well?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 124 guests