Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble adding compiler to windows path

Tags:

c++

c

gcc

mingw

I'm having a seemingly silly problem with my gcc compiler. I have installed MinGW at location C:\MinGW... and I have added C:\MinGW\bin to my windows path. However, when I got to the command prompt and type gcc --version... it doesn't recognize it. I have to cd manually to the bin before it will recognize it.

When I go back to my windows path it shows it there... so I'm not sure what the problem is. Any ideas? Thanks!

like image 247
Kent Avatar asked Oct 27 '25 03:10

Kent


1 Answers

How did you set the path? You should set it from Control Panel->System->Advanced->Environment Variables. The change will affect newly opened command consoles only.

If it then does not work, in the console, when you enter the command path does the displayed path list include your path? Is it correct?

Are ther other GNU toolchain paths that appear before the mingw one (Cygwin for example)?

Does the path contain spaces? Some ported GNU tools do not always work correctly with paths containing spaces.

like image 115
Clifford Avatar answered Oct 28 '25 18:10

Clifford