esp_http_server.h not found in project, but found in example

jaimea
Posts: 4
Joined: Tue Sep 17, 2019 12:09 pm

esp_http_server.h not found in project, but found in example

Postby jaimea » Wed Sep 18, 2019 11:21 am

Hello,

I'm surely missing something obvious but this is driving me mad.

I have a project, with a component dir full of files, compiling, working, wifi, udp, everything ok.
When I try to add http server support, whatever I do it never finds "esp_http_server.h".

If, however, I copy the protocols/http_server/simple example and compile it, there is no problem.

I can't find anything I should add to CMakeLists.txt or anywhere else.

Any clue, please?

ESP-IDF v4.0-dev-1275-gfdab15dc7

(I have had to copy esp_http_server.h and another file to local to make this compile)

Thanks in advance,

jaime

abhirama-951
Posts: 1
Joined: Fri Aug 08, 2025 11:58 am

Re: esp_http_server.h not found in project, but found in example

Postby abhirama-951 » Fri Aug 08, 2025 1:46 pm

I had the same issue, to resolve as mentioned in the ESP-IDF API guides, add REQUIRES segment in the CMakeLists.txt. BTW im using v5.4.1
requires.png
requires.png (24.08 KiB) Viewed 225 times
But after doing so i got another error as in freertos.h portYIELD_CORE should be defined. To solve that edit the portmacro.h file in esp/esp-idfv5.4.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos folder. Just remove the #if and #endif statements above and below the #define portYIELD_PORT statement
portYIELD_Err.png
portYIELD_Err.png (184.13 KiB) Viewed 225 times

Who is online

Users browsing this forum: Baidu [Spider], ChatGPT-User, Qwantbot and 1 guest