Eclipse C++ : Program g++ not found in PATH

Eclipse C++ : Program g++ not found in PATH

Today I have bumped into this problem and solved it in the following way. I pressed Reset defaults button everywhere I could find it in Eclipse settings (for example, Preferences/C++/Build/Settings/Discovery). After that the error disappeared and the code compiled successfully.

This is how I got rid of it:

  1. Install the MinGW.
  2. Select all files in the Basic Setup and select apply the changes.
  3. Select new C++ Project You will be able to see MinGW GCC in the toolchain section select the same and create project.

Eclipse C++ : Program g++ not found in PATH

You need a gcc, g++ compiler toolchain (on your windows machine) for the eclipse which you have manually downloaded,
One of the options can be done implicit via cygwin installation(by selecting proper development packages for gcc, g++) and then add the location of the compiled gcc ,g++ package like C:cygwinetcalternatives to the PATH variable for windows environment.

After this open eclipse and go to Project->properties->C/C++ Tool Chain Editor and add replace default GNU C++ compiler and GNU C Compiler with Cygwin C++ compiler and Cygwin C compiler and rebuild the project. The errors related to gcc, g++ PATH not found will now be gone.

Leave a Reply

Your email address will not be published.