Problems with GCC on Windows 10

Asked

Viewed 2,942 times

0

I am facing problems when changing IDE, I was told that DEVC++ contains a lot of bugs and by option I was already in the mood to try other IDE’s, so I decided to test Code::Blocks and Visual Studio Code, but in both of them they give problem when I run my code, example of what appears in Visual Studio:

'gcc' not recognized as an internal command or external, an Oper program or a batch file.

  • To use gcc in Microsoft Windows you need to use Mingw. http:/mingw.org/

  • Thanks @anonimo I was missing I install it there too, I thought that by already having Dev C++ and some IDE’s I thought GCC would also be installed on my PC

1 answer

2


Check that the PATH environment variable in Windows contains the mingw bin path

set PATH=C:\MinGW\bin;%PATH%

Making sure everything went right:

digitar gcc -v

If the first command does not work, try this (by finding the variable)

set path | findstr /I /C:"mingw"

Then check again:

digitar gcc -v
  • 1

    After that it should reopen the console window, and if it still doesn’t work, restart the computer.

  • @Exact cypherpotato, I needed to reboot the computer

  • 1

    Thank you all and I did the tests and it worked out and I even managed to run some codes that I did hehe

Browser other questions tagged

You are not signed in. Login or sign up in order to post.