1

我试图从 esp who 运行一个示例项目,它在单芯片示例下,从https://github.com/espressif/esp-who克隆。

它的识别例子。我包括一个 esp_http_client.h 但它找不到它。

有一个CMkakeLists.txt 和Makefile。我的第一个问题是,我是否必须编辑其中一个文件以包含标题,或者我必须在 gcc.xml 中添加目录路径。如果是这样,我该怎么做。

非常感谢。

4

1 回答 1

1

在您的情况下,您需要将非默认组件指定为要求esp_http_client。默认组件由 IDF 自动添加,可以在此处找到列表:https ://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html?highlight=default %20component#common-component-requirements

如果可以,请使用 cmake。可以在此处找到如何添加组件的说明:https ://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html?highlight=default%20component#组件需求

另一种简单的方法是查看 esp_http_client 示例。我为所有 idf 示例使用了一个“通用”组件,这可能足以启动:https ://github.com/espressif/esp-idf/tree/master/examples/protocols/esp_http_client 。

干杯。

于 2020-09-22T07:53:56.683 回答