公司的工程我在linux的环境下使用idf.py build编译。
找不到头文件
- ../components/flash/include/USER_FLASH.h:12:10: fatal error: USER_MAIN.h: No such file or directory
- #include "USER_MAIN.h"
cmake我刚接触,不知道在哪修改添加main/include的头文件目录
这是顶层的CMakeLists.txt
- cmake_minimum_required(VERSION 3.5)
- include($ENV{IDF_PATH}/tools/cmake/project.cmake)
- project(RobotAnnouncer)
- set(IDF_PROJECT_PATH ~/work/esp/project/8.RobotAnnouncer)
- set(COMPONENT_SRCS "main.c"
- ¦"ESP32_cJSON.c"
- ¦"WEB_SERVER.c")
- set(COMPONENT_ADD_INCLUDEDIRS "include")
- # Embed the server root certificate into the final binary
- set(COMPONENT_EMBED_TXTFILES ${IDF_PROJECT_PATH}/server_certs/ca_cert.pem)
- register_component()
附件图片是我的工程目录 以及 mian的结构