如何使用 MSYS2 在 VS 代码终端内编译 C 程序

问题描述 投票:0回答:0

我使用的是 Windows 10 笔记本电脑,我安装了 MSYS2 及其组件(gcc 和 gdb 编译器和调试器)并将它们包含在 %PATH% 变量中,现在每当我想创建一个 C 文件并编译它时,一个黑色的有点-like cmd 提示窗口弹出并开始无休止地加载,而 vs code 终端也不断地说正在构建程序。

This is the window that i get : And this is what i get when i run echo %PATH% on my terminal

注意:我进入了 VS 代码文档页面(这个:https://code.visualstudio.com/docs/cpp/config-mingw),它很有帮助,并且在我第一次运行 c 文件时效果很好,但是当我重新启动计算机时,它会回滚到我上面提到的奇怪提示

c terminal compiler-errors msys2
© www.soinside.com 2019 - 2024. All rights reserved.