c++eclipsepathmingw

MinGW not recognised through path variable


Eclipse CDT in Windows 7 is showing warnings like this: Error launching external scanner info generator (g++ -E -P -v -dD C:/Users/User/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)

So I already set the path environment variable to C:\MinGW\bin, but if i type gcc --version in cmd the command is not recognised. However, if I change the directory to C:\MinGW\bin, it works fine.


Solution

  • You can type "path" in the cmd window in order to see the path that's in effect (make sure you appended a value to the path variable and didn't replace it entirely, no spaces, etc.)

    If opening a new cmd or reboot doesn't help, you can use process monitor with a filter of "process name is cmd.exe" to see where exactly cmd.exe looks for gcc and why it is failing.