MinGW: “gcc is not recognized as an internal or ex

2020-02-23 07:35发布

I downloaded and installed MinGW. I used the graphical program to install the C++ compiler.

Typing gcc in the Windows command line prints:

gcc is not recognized as an internal or external command

I checked, and gcc.exe is present in C:\MinGW\bin. What's wrong?

5条回答
淡お忘
2楼-- · 2020-02-23 08:16

Although an old question, none of the answers here helped me. The only route I found to get to my destination is by typing in the following line in my command prompt:

enter image description here

After that, simply type in gcc -v.

Hope this helps anyone with the problem I had!

查看更多
欢心
3楼-- · 2020-02-23 08:17

Please try the following: click on "New" under Environmental Variables and add the following line to both user and system variables without editing:

C:\mingw32\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
查看更多
叼着烟拽天下
4楼-- · 2020-02-23 08:26

Or at the command line you must type in "\mingw\bin\gcc" instead of just "gcc". Best to set the environment as mentioned above.

查看更多
狗以群分
5楼-- · 2020-02-23 08:27

Please edit the Path variable to append a semicolon followed by location "C:\MinGW\bin" and do NOT use any spaces while doing so.

查看更多
老娘就宠你
6楼-- · 2020-02-23 08:30

maybe this is obvious, but don't forget that the PATH environment variable is case sensitive.

查看更多
登录 后发表回答