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

Moderator: ESP_ZT

myadmin
Posts: 5
Joined: Tue Nov 29, 2022 1:23 pm

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

Postby myadmin » Wed Nov 30, 2022 7:15 am

/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下载

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

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

Postby ESP_YJM » Thu Dec 01, 2022 9:11 am

你好,请问有按照 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"
我这边编译没有问题。

myadmin
Posts: 5
Joined: Tue Nov 29, 2022 1:23 pm

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

Postby myadmin » Fri Dec 02, 2022 3:48 am

重新到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

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

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

Postby ESP_YJM » Mon Dec 05, 2022 2:53 am

rainmaker 的版本貌似不对,你有执行 git checkout d4eb2f4fcab04fa625d502a12ece202d7d949c08 然后执行 git submodule update --init --recursive 吗?

myadmin
Posts: 5
Joined: Tue Nov 29, 2022 1:23 pm

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

Postby myadmin » Tue Dec 06, 2022 2:31 am

可以了,执行 git submodule update --init --recursive以后,就可以正常build了。

Who is online

Users browsing this forum: No registered users and 9 guests