跳动探索网

👨‍💻求助:VSCode使用Dev-C++的MinGW64编译器时报错🛠️

导读 最近尝试在VSCode中配置MinGW64编译器进行C++编程,但遇到了一些问题。希望各位大佬能提供一些解决思路💡。首先,我已经安装了最新版本的VS

最近尝试在VSCode中配置MinGW64编译器进行C++编程,但遇到了一些问题。希望各位大佬能提供一些解决思路💡。

首先,我已经安装了最新版本的VSCode,并且通过扩展安装了C/C++插件。接着,我将Dev-C++中的MinGW64编译器路径添加到了系统环境变量中。然而,在尝试编译一个简单的Hello World程序时,VSCode提示找不到编译器。错误信息如下:

```

> Executing task: g++ "c:\Users\Example\hello.cpp" -o "c:\Users\Example\hello.exe" && "c:\Users\Example\hello.exe"

'g++' is not recognized as an internal or external command,

operable program or batch file.

The terminal process failed to launch (exit code: 1).

```

👀问题可能出在哪里?是否需要重新配置环境变量?或者是在VSCode中需要额外设置什么吗?