Page 1 of 1

idf.py build 报错 No CMAKE_C_COMPILER could be found.

Posted: Sat Nov 07, 2020 10:06 am
by abu9999
使用 ESP-IDF 工具安装器2.3 安装
安装过程都正常,没有报错,install export都已执行
win10系统
懂的人帮忙看看

E:\esp\esp-idf>idf.py build
Executing action: all (aliases: build)
Running cmake in directory e:\esp\esp-idf\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 e:\esp\esp-idf"...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_ASM_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "E:/esp/esp-idf/CMakeFiles/CMakeOutput.log".
See also "E:/esp/esp-idf/CMakeFiles/CMakeError.log".
cmake failed with exit code 1

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Posted: Mon Nov 09, 2020 3:02 am
by ESP_morris
在你打开新的终端后,执行build之前,你需要先export环境变量,否则就会产生这种找不到找不到工具链的问题

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Posted: Tue Dec 08, 2020 2:50 am
by GrandRiver
照做了,问题还是没有解决呢

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Posted: Tue Dec 08, 2020 3:50 am
by ESP_morris
不要在IDF根目录执行idf.py build(你对一个SDK做编译没有任何意义),你至少要选择在一个project下做编译吧,比如某个idf的example