“raspberrypipico入门”文档:检测C编译器ABI信息-失败

我正在尝试在 Windows 11 上使用 Visual Studio Code 2022 构建 RP pico 示例。

我一直在关注“raspberry pi pico 入门”文档,并已成功使用 nmake 命令使用开发人员命令提示符构建示例。似乎第一个障碍是“检测 C 编译器 ABI 信息 – 失败”,请参阅下面的完整输出。我在整个互联网上搜索了堆栈溢出并尝试了各种人的修复,但似乎没有任何帮助。

我试过:设置 cl.exe 为管理员

以管理员身份运行开发人员命令提示符

重新安装 VS Code 和 cmake

手动安装的 windows sdk(因为它不是 MSVC 安装程序的选项)

运行 VsDevCmd.bat 失败并显示“遇到错误”,但仅此而已。我已经运行调试并输出到一个 txt 文件,但我不知道我在看什么。

提前致谢。


Microsoft (R) Program Maintenance Utility Version 14.32.31329.0
Copyright (C) Microsoft Corporation.  All rights reserved.

图片[1]-“raspberrypipico入门”文档:检测C编译器ABI信息-失败-唐朝资源网

[ 0%] Built target bs2_default [ 0%] Built target bs2_default_padded_checksummed_asm [ 0%] Performing configure step for 'ELF2UF2Build' -- The C compiler identification is MSVC 19.32.31329.0 -- The CXX compiler identification is MSVC 19.32.31329.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - broken CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/pico/Downloads/pico-examples/build/elf2uf2/CMakeFiles/CMakeTmp

图片[2]-“raspberrypipico入门”文档:检测C编译器ABI信息-失败-唐朝资源网

Run Build Command(s):nmake -f Makefile /nologo cmTC_add02fast && "C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.32.31326binHostx64x64nmake.exe" -f CMakeFilescmTC_add02.dirbuild.make /nologo -L CMakeFilescmTC_add02.dirbuild Building C object CMakeFiles/cmTC_add02.dir/testCCompiler.c.obj "C:Program FilesCMakebincmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFilescmTC_add02.dirtestCCompiler.c.obj.d --working-dir=C:picoDownloadspico-examplesbuildelf2uf2CMakeFilesCMakeTmp --filter-prefix="Note: including file: " -- C:PROGRA~2MICROS~42022BUILDT~1VCToolsMSVC1432~1.313binHostx64x64cl.exe @C:UsersDanAppDataLocalTempnmE440.tmp testCCompiler.c Linking C executable cmTC_add02.exe "C:Program FilesCMakebincmake.exe" -E vs_link_exe --intdir=CMakeFilescmTC_add02.dir --rc=C:PROGRA~2WI3CF2~110bin100226~1.0x86rc.exe --mt=C:PROGRA~2WI3CF2~110bin100226~1.0x86mt.exe --manifests -- C:PROGRA~2MICROS~42022BUILDT~1VCToolsMSVC1432~1.313binHostx64x64link.exe /nologo @CMakeFilescmTC_add02.dirobjects1.rsp @C:UsersDanAppDataLocalTempnmE49F.tmp LINK Pass 1: command "C:PROGRA~2MICROS~42022BUILDT~1VCToolsMSVC1432~1.313binHostx64x64link.exe /nologo @CMakeFilescmTC_add02.dirobjects1.rsp /out:cmTC_add02.exe /implib:cmTC_add02.lib /pdb:C:picoDownloadspico-examplesbuildelf2uf2CMakeFilesCMakeTmpcmTC_add02.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFilescmTC_add02.dir/intermediate.manifest CMakeFilescmTC_add02.dir/manifest.res" failed (exit code 1104) with the following output: LINK : fatal error LNK1104: cannot open file 'MSVCRTD.lib' NMAKE : fatal error U1077: '"C:Program FilesCMakebincmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.32.31326binHostx64x64nmake.exe"' : return code '0x2' Stop. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)

图片[3]-“raspberrypipico入门”文档:检测C编译器ABI信息-失败-唐朝资源网

-- Configuring incomplete, errors occurred! See also "C:/pico/Downloads/pico-examples/build/elf2uf2/CMakeFiles/CMakeOutput.log". See also "C:/pico/Downloads/pico-examples/build/elf2uf2/CMakeFiles/CMakeError.log". NMAKE : fatal error U1077: 'echo' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.32.31326binHostx64x64nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.32.31326binHostx64x64nmake.exe"' : return code '0x2' Stop.

© 版权声明
THE END
喜欢就支持一下吧
点赞54 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片