C++编译器在完整安装后未被识别。

huangapple go评论67阅读模式
英文:

C++ Compiler Is Not Recognised After Full Installation

问题

我尝试在我的操作系统(Windows 10)上运行C++代码。我安装了MSYS2并按照其指南进行操作(使用pacman安装gcc)。问题是在这一步之后,当我输入gcc --version时,仍然显示“gcc: command not found”。

我将“C:\msys64\mingw32\bin”添加到我的用户变量的Path中,然后再次运行命令,但仍然出现相同的错误。
我完全困惑了。是否有人有任何建议?

谢谢。

英文:

I am trying to run C++ code on my OS (Windows 10). I installed MSYS2 and followed its instructions (using pacman to install gcc). The problem is after this step, when i type gcc --version i still get "gcc: command not found".

I added "C:\msys64\mingw32\bin" to my user variable's Path and ran the command again and i still get the same error.
I am totaly confused here. Does anyone have any suggestion?

Thanks

答案1

得分: 0

For gcc在Windows上,您需要从sourceforge.net下载并运行mingw-get-setup.exe。

英文:

I suppose, for gcc on Windows you need download from sourceforge.net and run mingw-get-setup.exe

huangapple
  • 本文由 发表于 2023年4月17日 23:14:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76036668.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定