nkolban / esp32-snippets

Sample ESP32 snippets and code fragments
https://leanpub.com/kolban-ESP32
Apache License 2.0
2.37k stars 710 forks source link

I get header errors when I try to build using VS code. What's the best way to include the entire esp32-snippets in my compile? #1026

Open mrSilkie opened 4 years ago

mrSilkie commented 4 years ago

Hi there. I'm just a bit stuck trying to follow along with one of the video tutorials.

I've tried to include the entire /esp32-snippets/ folder into my CMakeLists

idf_component_register(SRCS "smartbucket.cpp" "SampleNotify.cpp" INCLUDE_DIRS "${IDF_PATH}/esp32-snippets/cpp_utils" INCLUDE_DIRS "${IDF_PATH}/esp32-snippets/cpp_utils/tests/BLETests")

And can compile up to the point where I get

../main/SampleNotify.cpp:42:1: error: 'BLECharacteristic' does not name a type

I've tried to look for various ways on how to include these files and get them to compile correctly and am still a bit stuck. The included vscode in the esp32 snippets looks to be for windows compilers instead of the typical terminal idf.py build.

Any pointers would be much appreciated!