Eclipse does not see header files

jenya7
Posts: 19
Joined: Mon Feb 24, 2020 9:14 am

Eclipse does not see header files

Postby jenya7 » Mon Feb 24, 2020 9:20 am

When I compile a project it compiles OK.
But if I add a header file
#include "driver/i2c.h"
I get - Unresolved inclusion.

If I add the header file in hello_world_main.c - it's OK.
But if I crate a new C file and add the header file in the new file - I get an error - Unresolved inclusion.

How can I fix the issue?

Well...If I add the new files to CMakeLists.txt it becomes visible to libraries. Seems like it fixes the problem.

Some of the includes is not visible any way
#include "bt.h"
#include "bta_api.h"
#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
not visible when I want to use BLE features.

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

Re: Eclipse does not see header files

Postby ESP_krzychb » Mon Feb 24, 2020 10:07 pm

jenya7 wrote: Some of the includes is not visible any way
#include "bt.h"
#include "bta_api.h"
#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
not visible when I want to use BLE features.


Hi jenya7,

It is hard to say what is the source of this issue basing just on the list of header files.

Could you post the name of specific BLE example that has this issue?
Ideally please select from standard examples available with Eclipse plugin installation.

File > New > Espressif IDF Project > ([x] Create a project using one of the templates) > bluetooth > bluedroid > ble > ...

jenya7
Posts: 19
Joined: Mon Feb 24, 2020 9:14 am

Re: Eclipse does not see header files

Postby jenya7 » Tue Feb 25, 2020 6:31 am

Thank you. This way it works.
I see a set(COMPONENT_ADD_INCLUDEDIRS ".") entrance in the CMakeLists.txt file. So I understand all paths can be added manually. What is the syntax to add directories?

Because if I choose a template - it compiles OK, but if I want to add another modules to my projects - I get the same unresolved inclusion problem.

Who is online

Users browsing this forum: No registered users and 86 guests