gpt4 book ai didi

c++ - 当前步骤 : Building Tasks. json 文件

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:04:52 25 4
gpt4 key购买 nike

我在执行此 https://www.youtube.com/watch?v=DIw02CaEusY 时遇到以下错误谁能帮我找出我搞砸的地方。

    {
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "g++",
"args": ["-g", "main.cpp"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

Executing task: g++ -g main.cpp <

'g++' is not recognized as an internal or external command, operable program or batch file. The terminal process terminated with exit code: 1

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

最佳答案

例如参见 Microsoft/vscode-cpptools/issue 1329 :

I've reproed the problem. I'm not sure why VS Code isn't picking the environment path or what path it's using, because it picks up my CMake directory somehow, but not my MinGW directory. I was able to fix this via using the full path to g++ in the command

Change the command property to from "g++" to "C:/MinGW/bin/g++".

关于c++ - 当前步骤 : Building Tasks. json 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52324337/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com