Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT - "Program "-E" not found in PATH

This is driving me NUTS. I recently tweaked around with my C Project's:

C/C++ General ->Paths and Symbols->Includes->GNU C->Include Directories.

Now, I get the following Error listed:

Program "-E" not found in PATH

Location: Project Properties, C++ Preprocessor \
          Include.../Providers, [CDT Cross GCC Built-in \
           Compiler Settings] options

Short of making a new Workspace and starting over, what the heck does this mean, and how do I fix my current project???

Note

Closing Eclipse, Checking out the project from Source-Control Fresh, and restarting still shows the problem!!! How the heck can this be.

-Justin

like image 440
J-Dizzle Avatar asked Mar 05 '14 20:03

J-Dizzle


2 Answers

I had quiet similar problem, in my case changing toolchain from Linux GCC to Cross GCC in project properties (C/C++ Build -> Tool Chain Editor -> Current toolchain) resolved the issue

like image 154
endryha Avatar answered Sep 20 '22 05:09

endryha


In the project settings go to "C/C++ Build > Tool Chain Editor". The selected tool chain was empty in my case. Thus I selected the tool chain that I use (which seems to be "Cross GCC" in your case). This will set the ${COMMAND} variable (and ${FLAGS} and ${INPUTS}), which seems to be unset in your case. If you for example close the project and reopen it the error should be gone.

The second option I see is that the command with which Eclipse determines the default definitions and include paths of your compiler/tool chain got screwed up when you "tweaked your project". You should be able to fix this as follows: Open the project settings and go to "C/C++ General > Preprocessor Include Paths, Macros etc.", select the "Providers" tab, select the active "CDT * Built-in Compiler Settings" provider from the list and make sure that the "Command to get compiler specs" starts with '${COMMAND} -E' instead of '-E'. In my case the complete line is '${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"'. If you no longer want to see the output when Eclipse is executing this command you can uncheck "Allocate console in the Console View".

like image 2
user1225999 Avatar answered Sep 21 '22 05:09

user1225999