Kent
Kent

Reputation: 115

Trouble adding compiler to windows path

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!

Upvotes: 4

Views: 11947

Answers (2)

Clifford
Clifford

Reputation: 93456

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.

Upvotes: 2

Andy Thomas
Andy Thomas

Reputation: 86381

Have you started a new command window? The path doesn't change in existing windows as you change the path through environment variables.

Do you see the desired path in the output of:

  C:\> echo %PATH%

Upvotes: 2

Related Questions