esp-mdf icon indicating copy to clipboard operation
esp-mdf copied to clipboard

mdf的router例程添加idf下组件失败

Open yeqinggui opened this issue 2 years ago • 1 comments

打算用mesh组网采用websocket协议与服务器通信,独立测试E:\Espressif\esp-mdf\examples\function_demo\mwifi\router 下的router后,参考idf示例下的websocket例程,在router的router_example文件添加websocket的必要头文件,但是编译一直报无法找到esp_transport.h文件,参考网上方式,各种实验都是无法编译成功esp_transport.h文件的路径为:E:\Espressif\esp-mdf\esp-idf\components\tcp_transport,在router目录下的CMakeLists添加路径: set(EXTRA_COMPONENT_DIRS "S{EXTRA_COMPONENT_DIRS}esp-idf/components/tcp_transport") 或者 set(EXTRA_COMPONENT_DIRS $ENV{MDF_PATH}/esp-idf/components/tcp_transport)等都不行

yeqinggui avatar Jun 08 '22 08:06 yeqinggui

Hi @yeqinggui 你是否有添加如下: set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)

对了,还有你IDF路径是否配置过那?这个按照正常cmakelist是可以找到对应的路径的。

如果还是不行的话,你可以在你的 mian里面的cmakelist文件里面添加 idf_component_register{ REQUIRES tcp_transport } 看一下如何?

Jiangyafeng avatar Jun 29 '22 14:06 Jiangyafeng