Page 1 of 1

build fail???????

Posted: Fri Dec 03, 2021 11:57 am
by zhn1021256354
|-app_s
|-app_1
|-app_1.c app_1.h CMakeLists.txt component.mk
|-app_2
|-app_2.c app_2.h CMakeLists.txt component.mk
|-basic_s
|-basic_1
|-basic_1.c basic_1.h CMakeLists.txt component.mk
|-basic_2
|-basic_2.c basic_2.h CMakeLists.txt component.mk
|-main
|-start_1.c start_1.h CMakeLists.txt component.mk
|-sys_a
|-sys_api.c sys_api.h CMakeLists.txt component.mk
|-CMakeLists.txt Makefile readme.txt sdkconfig

note:

app_1.h中包含app_2.h,basic_1.h,basic_2.h,sys_api.h;
app_2.h中包含app_1.h,basic_1.h,basic_2.h,sys_api.h;
basic_1.h中包含basic_2.h,sys_api.h;
basic_2.h中包含basic_1.h,sys_api.h;
start_1.h中包含app_1.h,app_2.h,basic_1.h,basic_2.h,sys_api.h;


原厂技术指导一下,文档不对,请指导一下,谢谢

Re: build fail???????

Posted: Sun Dec 05, 2021 9:16 am
by zhn1021256354
fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3.1-dirty\" -DESP_PLATFORM -MD -MT esp-idf/ota_manage/CMakeFiles/__idf_ota_manage.dir/ota_task.c.obj -MF esp-idf\ota_manage\CMakeFiles\__idf_ota_manage.dir\ota_task.c.obj.d -o esp-idf/ota_manage/CMakeFiles/__idf_ota_manage.dir/ota_task.c.obj -c ../basic_service/ota_manage/ota_task.c
In file included from ../basic_service/ota_manage/ota_task.c:11:
../basic_service/ota_manage/ota_task.h:16:10: fatal error: esp_ota_ops.h: No such file
or directory
#include "esp_ota_ops.h"
^~~~~~~~~~~~~~~
compilation terminated.
[1202/1265] Building C object esp-idf/mqtt.../__idf_mqtt.dir/esp-mqtt/mqtt_client.c.objninja: build stopped: subcommand failed.
ninja failed with exit code 1
PS E:\esp32\usr\prj\blink\source>

Re: build fail???????

Posted: Mon Dec 06, 2021 8:47 am
by zhn1021256354
LJ

Re: build fail???????

Posted: Mon Dec 06, 2021 9:43 pm
by ESP_igrr
It seems that you are missing component requirements (REQUIRES, PRIV_REQUIRES) in idf_component_register() call. Please read the documentation section about component requirements (dependencies) starting from https://docs.espressif.com/projects/esp ... .html#id28.