我已经为mingw设置了正确的路径,并且能够使用vscode中的终端成功编译我的代码。但是当我按ctrl + shift + b进行构建时,在终端中出现以下错误
Executing task: C:\MinGW\bin\g++.exe -g 'c:\Users\Ansh Kapoor\Desktop\cpp\main.cpp' -o 'c:\Users\Ansh
Kapoor\Desktop\cpp\main.exe'<
/usr/bin/bash: C:MinGWbing++.exe: command not found
The terminal process terminated with exit code: 127
而我编写时成功执行了相同的代码
g++ main.cpp -o 'main.exe'
现在我已经检查了路径和环境变量,所有这些都正确。
找不到正确路径的错误是因为使用git bash作为终端而不是Windows powershell或cmd。