首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当遇到忍者和CMake问题时,如何在VSCode上构建ESP项目?

当遇到忍者和CMake问题时,如何在VSCode上构建ESP项目?
EN

Stack Overflow用户
提问于 2021-01-03 20:05:51
回答 1查看 649关注 0票数 1
代码语言:javascript
复制
Executing task: cmake -G Ninja .. <

-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/ASUS/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/ASUS/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/ASUS/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- 
broken
CMake Error at C:/Users/ASUS/Desktop/project/classmates/tools/cmake/3.16.4/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/Users/ASUS/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/ASUS/Desktop/project/esp-idf-master/build/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Users/ASUS/anaconda4/Scripts/ninja.exe cmTC_4bc5c && [1/2] Building C object CMakeFiles/cmTC_4bc5c.dir/testCCompiler.c.obj        
    [2/2] Linking C executable cmTC_4bc5c.exe
    FAILED: cmTC_4bc5c.exe
    cmd.exe /C "cd . && C:\Users\ASUS\.espressif\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe    CMakeFiles/cmTC_4bc5c.dir/testCCompiler.c.obj  -o cmTC_4bc5c.exe -Wl,--out-implib,libcmTC_4bc5c.dll.a -Wl,--major-image-version,0,--minor-image-version,0   && cd ."   
    c:/users/asus/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: unrecognized option '--major-image-version'
    c:/users/asus/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: use the --help option for usage information
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/ASUS/Desktop/project/esp-idf-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/ASUS/Desktop/project/esp-idf-master/build/CMakeFiles/CMakeError.log".
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja .." terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.
EN

回答 1

Stack Overflow用户

发布于 2021-05-19 05:54:41

尝试删除项目文件夹中的" build“文件夹,并重复构建过程。删除的文件夹将由CMake重新创建。当某个项目被复制到新位置并试图生成时,会发生此错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65549638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档