从github下载的esp32-cam程序在esp-idf和eclipse下编译出错,错误信息为
CMake Error at CMakeLists.txt:34 (register_component):
Unknown CMake command "register_component".
[求助]esp32-cam程序编译出错
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: [求助]esp32-cam程序编译出错
这个是IDF中自定义的Cmake函数,初步怀疑你的{IDF_PATH}环境变量没有设置正确
-
- Posts: 2
- Joined: Thu Oct 15, 2020 4:34 am
Re: [求助]esp32-cam程序编译出错
谢谢回复,我把helloworld例程里的
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello-world)
复制进工程cmakelist.txt中,仍然报错
CMake Error at C:/Users/Liuhaipeng/Desktop/esp-idf/tools/cmake/component.cmake:430 (message):
Called idf_component_register from a non-component directory.
Call Stack (most recent call first):
C:/Users/Liuhaipeng/Desktop/esp-idf/tools/cmake/component.cmake:536 (idf_component_register)
CMakeLists.txt:41 (register_component)
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello-world)
复制进工程cmakelist.txt中,仍然报错
CMake Error at C:/Users/Liuhaipeng/Desktop/esp-idf/tools/cmake/component.cmake:430 (message):
Called idf_component_register from a non-component directory.
Call Stack (most recent call first):
C:/Users/Liuhaipeng/Desktop/esp-idf/tools/cmake/component.cmake:536 (idf_component_register)
CMakeLists.txt:41 (register_component)
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: [求助]esp32-cam程序编译出错
Called idf_component_register from a non-component directory.“
只能在组建的Cmake文件中调用idf_component_register
IDF的Cmake构建系统文档:https://docs.espressif.com/projects/esp ... ystem.html
只能在组建的Cmake文件中调用idf_component_register
IDF的Cmake构建系统文档:https://docs.espressif.com/projects/esp ... ystem.html
Who is online
Users browsing this forum: Google [Bot] and 48 guests