0

Eclipse keeps telling me 'Program g++/gcc not found in PATH'. I've done at least an hour of internet research to try to fix the problem, from modifying my system path to include C:\MinGW\bin (where it's confirmed gcc and g++ exist) to Restoring default settings in several different preference menus, all to no avail. In Project Settings > C/C++ Build > Environemnt, my PATH variable looks like:

C:\MinGW\bin;${MSYS_HOME}\bin;C:/Program Files/Java/jre1.8.0_91/bin/server;C:/Program Files/Java/jre1.8.0_91/bin;C:/Program Files/Java/jre1.8.0_91/lib/amd64;C:\MinGW\bin\;C:\ProgramData\Oracle\Java\javapath;C:\apache-tomcat-7.0.21/bin;C:\org.apache.ant_1.7.0.v200706080842\bin;C:\jdk6\bin;C:\Microsemi\Libero_v8.5\Model\win32acoem;C:\Microsemi\Libero_v8.5\Designer\bin;C:\Microsemi\Libero_v9.1\Model\win32acoem;C:\Microsemi\Libero_v9.1\Designer\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Microsemi\Libero_v8.5\WFL/bin;C:\Program Files\Amazon\AWSCLI\;C:\Eclipse\eclipse-cpp-luna-R-win32-x86_64\eclipse;C:\MinGW\bin

C:\MinGW\bin is at the beginning, although the error log

tells me that my PATH is empty. Any idea what could be going wrong?

Justin
  • 33
  • 1
  • 6
  • The error log does not tell you that PATH is empty, it says that g++ and gcc are not found. Notice that every slash in your PATH above is a backslash except those for java - edit your PATH to the bare minimum. Note too that you don't have `"` around your space embedded PATH variables (maybe it should be "c:/program files/java\......" not c:/program files/java/....) – KevinDTimm Jul 13 '16 at 21:00
  • 1
    See http://stackoverflow.com/questions/11703432/eclipse-c-program-g-not-found-in-path – KevinDTimm Jul 13 '16 at 21:04
  • @KevinDTimm I changed all the '/' to '\' and that didn't work. I followed the link you provided, but none of the solutions there seemed to work. Do you think it might be a MinGW problem? Also, can you elaborate on ' Note too that you don't have " around your space embedded PATH variables '. Don't quite understand that part. – Justin Jul 13 '16 at 22:06
  • Embedded spaces in your path can screw things up, so instead of having `...;c:/program files/java/jre1.8.0_91/bin/server;...` you would have `...;"c:/program files/java/jre1.8.0_91/bin/server";...` – KevinDTimm Jul 14 '16 at 14:23

1 Answers1

0

I got the approval from my company to uninstall Eclipse and install the latest version, and everything worked flawlessly. May have had something to do with the way Eclipse was set up.

Justin
  • 33
  • 1
  • 6