path to component includes

StefanHri
Posts: 1
Joined: Sat Jan 25, 2020 5:56 pm

path to component includes

Postby StefanHri » Sat Jan 25, 2020 6:08 pm

Hi,
I want to use some of the provided by esp-idf components in my project, e.g., cbor.
When i include the header file

Code: Select all

#include "cbor.h"
in my application file in order to use the cbor API and compile

Code: Select all

idf.py buil
I get

Code: Select all

fatal error: cbor.h: No such file or directory
 #include "cbor.h"
How to make the components header files visible to my application code?

Thank you

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: path to component includes

Postby ESP_krzychb » Sun Jan 26, 2020 1:21 pm

StefanHri wrote: How to make the components header files visible to my application code?
Hi StefanHri,

All esp-idf components should be already visible, given you have successfully completed Get Started instructions to compile "hello_world" example (I would use it to test if your include works).

Do you see "cbor" component in your "esp-idf/components" directory? I believe this component has been added to the master branch in August last year, so if you are using "stable" version of ESP-IDF (v3.3.1), it is not there.

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: path to component includes

Postby chegewara » Sun Jan 26, 2020 9:29 pm

https://docs.espressif.com/projects/esp ... quirements

add REQUIRES cbor or PRIV_REQUIRES cbor

Who is online

Users browsing this forum: No registered users and 155 guests