请教一下,我在自己的.H文件中,想包含nvs_flash.h,提示找不到文件。在.c添加不会报错
在cmake.txt里,已经添加了requires
set(COMPONENT_REQUIRES bt nvs_flash)
请问还有是哪里设置不对吗?或者别的原因
【急】请教一个问题,在自己写的.h文件不能包含系统的头文件,比如nvs_flash.h
-
abcrazy2020
- Posts: 16
- Joined: Thu May 06, 2021 6:01 am
Re: 【急】请教一个问题,在自己写的.h文件不能包含系统的头文件,比如nvs_flash.h
最笨的方法就是,你在cmake文件写死路径呀,像
idf_component_register(SRCS "hello_world_main.c"
INCLUDE_DIRS "")
你可以在 INCLUDE_DIRS 后面添加绝对路径
idf_component_register(SRCS "hello_world_main.c"
INCLUDE_DIRS "." "include" "E:/ESP32/esp-idf/components/usb/private_include" "E:/ESP32/esp-idf/components/usb" )
idf_component_register(SRCS "hello_world_main.c"
INCLUDE_DIRS "")
你可以在 INCLUDE_DIRS 后面添加绝对路径
idf_component_register(SRCS "hello_world_main.c"
INCLUDE_DIRS "." "include" "E:/ESP32/esp-idf/components/usb/private_include" "E:/ESP32/esp-idf/components/usb" )
Who is online
Users browsing this forum: No registered users and 2 guests