首页 > 解决方案 > /usr/bin/bash: g++: 找不到命令

问题描述

刚刚在 VS Code 中启动 C++,我用 MinGW、编译器、扩展、调试等设置了 uo C++。我陷入了一个我找不到解决方案的问题。在我完成 task.json 之后:

        "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "g++",
            "args": [
                      "-g", "learn.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

在我输入 Ctrl+Shift+B 以便它可以在终端中显示后,它显示:

/usr/bin/bash: g++: command not found
The terminal process terminated with exit code: 127

如果你们帮我解决这个问题,我将不胜感激!

感谢你!!

标签: c++visual-studio-codeterminalg++mingw

解决方案


推荐阅读