Page 1 of 1

headers not finding headers?

Posted: Sun Dec 10, 2023 10:24 pm
by gamename
Hi,

I'm struggling to get my first ESP32 app working. It senses an open on a reed switch connection and then sends a http post message when that happens. The ESP32 is Wi-Fi attached.

I've added an extensive collection of `include_directories()` to my `CMakeLists.txt` so that all the headers in `main.c` are being located. But, it looks like headers inside other headers are not found. I'm getting errors like this:

Code: Select all

In file included from /Users/tennis/CLionProjects/esp32-garage-sensor/main.c:1:
/Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:63:10: fatal error: FreeRTOSConfig.h: No such file or directory
   63 | #include "FreeRTOSConfig.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

Do I need to add even more `include_directories()`entries in `CMakeLists.txt`? Or, is there some other way to accomplish this? Maybe there's a bigger issue I'm missing?

All the code is here: https://github.com/gamename/esp32_garage_sensor

My IDE is CLion.

Thanks,
-T

Re: headers not finding headers?

Posted: Mon Dec 11, 2023 5:13 pm
by gamename
I finally got around this by abandoning CLion as my IDE. I switched to vscode and then use ide.py for building. Everything works now. CLion was just too much of hassle.