I'm trying to build one of the Kolban's BLE examples, but have hit a build issue I can't figure out. I'm using eclipse and getting:
"fatal error: esp_gattc_api.h: No such file or directory"
I get the same error if I run make from a terminal.
I've successfully built the cpp3 c++ app, I've used menuconfig to enable bluetooth and bluedroid. I created a components folder with the snippets files. I checked project properties paths and symbols and I have an entry for: ${IDF_PATH}/components/bt/bluedroid/api/include which is where the file is. I checked the folder and the file is there.
Exploring further, I deleted the components folder with the snippets stuff and put "#include <esp_gattc_api.h>" into helloworld_main.cpp and I get the same error. Also it appears that trying to include any .h under bluedroid will fail, but "bt.h" in bt/include compiles fine.
Alan
esp32-snippets BLE build problem
Re: esp32-snippets BLE build problem
In cases like this, it is wise to use full path the header file, assuming you have found where that file is. Once you have sorted out the issues, place the header the right folder and then add the path onto Eclipse's "symbols and include path" tab.
Re: esp32-snippets BLE build problem
This video may also help:
https://www.youtube.com/watch?v=-ttiPfmrehU
If problems persist, feel free to create an issue on the Github issues page found here:
https://github.com/nkolban/esp32-snippets/issues
However I think you were probably right posting here ... as I suspect that the puzzle is ESP32 generic and could be re-phrase to:
1. The source of the file trying to perform the inclusion.
2. The directory structure of your ESP-IDF environment.
3. Exactly how you are attempting to build the app.
https://www.youtube.com/watch?v=-ttiPfmrehU
If problems persist, feel free to create an issue on the Github issues page found here:
https://github.com/nkolban/esp32-snippets/issues
However I think you were probably right posting here ... as I suspect that the puzzle is ESP32 generic and could be re-phrase to:
The thinking here is that the missing include file in the compilation is an ESP-IDF supplied header. Again, if the problem persists, I'll be happy to work with you directly to try and assist. What we'd want to see are:How do I specify directories for include files in a C++ environment when writing ESP-IDF applications?
1. The source of the file trying to perform the inclusion.
2. The directory structure of your ESP-IDF environment.
3. Exactly how you are attempting to build the app.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: esp32-snippets BLE build problem
Thanks for both replies. I had watched the "Building a C++ application" video you sent a link to, and that part of it went fairly well. My problems started when I created a new components folder and added in the esp32-snippets. I managed to import the includes and rebuild the index. But I was still getting the unresolved inclusion errors. The file existed and it's folder was listed in the includes.
I did finally get it to build. I'm not %100 sure, but it seemed like things started working after a project clean.
I think there is something about Eclipse that I'm not understanding. I feel like I spend most of my time trying to understand the tool instead of understanding the code.
I did finally get it to build. I'm not %100 sure, but it seemed like things started working after a project clean.
I think there is something about Eclipse that I'm not understanding. I feel like I spend most of my time trying to understand the tool instead of understanding the code.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], tahseenabbas52 and 91 guests