【问题标题】:What do I do when i receive this feedback after running a code in C?在 C 中运行代码后收到此反馈时我该怎么办?
【发布时间】:2022-11-02 17:52:41
【问题描述】:

在 vscode 中运行代码后的反馈;

gcc : The term 'gcc' is not recognized as the name 
of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a 
path was included, verify that the path is correct 
and try again.
At line:1 char:40

我输入的代码;

#include<stdio.h>

int main()  {
   printf("Hello World")
}

【问题讨论】:

  • 什么操作系统?你安装了什么版本的gcc?
  • 同样,从我们收到的关于 Visual Studio Code 的大量初学者问题来看,它显然完全不适合初学者。获得一个更好的 IDE,它预装了编译器、链接器和调试器。
  • “运行代码后”:不,你没有运行任何东西。 gcc 是 vscode 尝试查找但由于工具配置不完整而失败的编译器的名称。
  • 错误消息是输入未知命令时 Windows PowerShell 打印的消息。很可能是Windows。但这仍然应该在问题中提及。

标签: c visual-studio-code


【解决方案1】:

您需要在系统上安装 gcc 编译器并将其添加到路径中。在这里你可以寻求帮助。

https://www.scaler.com/topics/c/c-compiler-for-windows/

【讨论】:

  • 问题中没有任何内容表明这是针对 Windows 的,因此如果没有明确说明,就无法回答该问题。
猜你喜欢
  • 2018-03-20
  • 2013-12-17
  • 2022-11-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-13
  • 2022-12-05
  • 2011-05-11
相关资源
最近更新 更多