Page 1 of 1

第7个例子:RainMaker Insights 示例在build时报错,缺少app_insights.h文件

Posted: Wed Nov 30, 2022 7:15 am
by myadmin
/device_firmware/7_insights/main/app_main.c:36:10: fatal error: app_
insights.h: No such file or directory
#include "app_insights.h"
^~~~~~~~~~~~~~~~
compilation terminated.

代码从https://github.com/espressif/book-esp32c3-iot-projects/tree/main/device_firmware/7_insights下载

Re: 第7个例子:RainMaker Insights 示例在build时报错,缺少app_insights.h文件

Posted: Thu Dec 01, 2022 9:11 am
by ESP_YJM
你好,请问有按照 https://github.com/espressif/book-esp32 ... ADME_cn.md 这个文档进行编译吗?该头文件位于 esp-rainmaker/examples/common/app_insights/

Code: Select all

$ git clone --recursive https://github.com/espressif/esp-rainmaker.git
$ cd esp-rainmaker
$ git checkout d4eb2f4fcab04fa625d502a12ece202d7d949c08
$ git submodule update --init --recursive
$ export RAIMAKER_PATH="$PWD"
我这边编译没有问题。

Re: 第7个例子:RainMaker Insights 示例在build时报错,缺少app_insights.h文件

Posted: Fri Dec 02, 2022 3:48 am
by myadmin
重新到https://github.com/espressif/esp-rainmaker.git下载了相关的代码,现在没有那个错误了,但出现了新的erros如下所示:



/esp-rainmaker/examples/common/app_insights/app_insights.c: In
function 'app_insights_enable':
/esp-rainmaker/examples/common/app_insights/app_insights.c:52:5
: error: implicit declaration of function 'esp_insights_mqtt_setup'; did you mea
n 'esp_insights_send_data'? [-Werror=implicit-function-declaration]
esp_insights_mqtt_setup(mqtt_config);
^~~~~~~~~~~~~~~~~~~~~~~
esp_insights_send_data
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Re: 第7个例子:RainMaker Insights 示例在build时报错,缺少app_insights.h文件

Posted: Mon Dec 05, 2022 2:53 am
by ESP_YJM
rainmaker 的版本貌似不对,你有执行 git checkout d4eb2f4fcab04fa625d502a12ece202d7d949c08 然后执行 git submodule update --init --recursive 吗?

Re: 第7个例子:RainMaker Insights 示例在build时报错,缺少app_insights.h文件

Posted: Tue Dec 06, 2022 2:31 am
by myadmin
可以了,执行 git submodule update --init --recursive以后,就可以正常build了。