VSCODE 编译例程出错(windos + wsl)

shl2130
Posts: 7
Joined: Wed Sep 18, 2024 1:44 am

VSCODE 编译例程出错(windos + wsl)

Postby shl2130 » Mon Jan 06, 2025 12:36 pm

朋友们 给看看 怎么个处理办法? 入门 真难呀。。。
【输出】端口信息如下:
[cmake] See also "/home/lenovo_szt/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
[proc] 命令“/usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ --no-warn-unused-cli -S/home/lenovo_szt/esp-idf/examples/get-started/hello_world -B/home/lenovo_szt/esp-idf/examples/get-started/hello_world/build -G Ninja”已退出,代码为 1

【问题】 信息如下:
CMake Error at CMakeLists.txt:5 (include):include could not find load file:

/tools/cmake/project.cmake

怎么解决? 是少安装了什么东西吗?

shl2130
Posts: 7
Joined: Wed Sep 18, 2024 1:44 am

Re: VSCODE 编译例程出错(windos + wsl)

Postby shl2130 » Mon Jan 06, 2025 1:39 pm

这是代码界面的 截图。include"...." 包含的头文件下面都有波浪线。不知道是否意味着 此处又错误? 感谢热心朋友 帮忙看下如何解决
Attachments
cmacke-err.png
main.c 感觉像是错误提示的部分。感觉就像包含文件的路径不对(没用过 VS)
cmacke-err.png (32.37 KiB) Viewed 1204 times

Luxni_
Posts: 46
Joined: Mon Aug 16, 2021 6:20 am

Re: VSCODE 编译例程出错(windos + wsl)

Postby Luxni_ » Mon Jan 13, 2025 7:36 am

我猜你应该是 使用命令来编译的, 它在使用前需要设置一下环境变量:
第四步:设置环境变量


这个波浪线需要你编译成功后才能消失。

Who is online

Users browsing this forum: No registered users and 56 guests