我创建了一个项目 ESP32-idf 并写了一个库名称 http_server 但我无法构建项目并出现错误
D:/esp/test/station/input/input/http_server.h:3:10: 致命错误: esp_wifi.h: 没有那个文件或目录 3 | #包括
我认为文件夹库 http_server 没有与 espressif 链接。[在此处输入图片描述] 我在 http_server 中的 CMAKElist 是: 设置(app_src http_server.c)
your text
设置(pri_req)
idf_component_register(SRCS ${app_src}
INCLUDE_DIRS“。”
需要 ${pri_req}
)
我的 CMAKElist 主要是:idf_component_register(SRCS "station_example_main.c" "anh.jpg"
INCLUDE_DIRS“。”
)
我在项目中的 CMAKElist 是:
cmake_minimum_required(版本 3.16) 设置(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/http_serve
your text
r)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wifi_station)
#target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/anh.jpg" TEXT)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "html/index.html" TEXT)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "html/black.svg" IMAGE)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "html/cloud2.svg" IMAGE)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "html/cloud1.svg" IMAGE)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "html/white.svg" IMAGE)
谢谢你的帮助。