Eclipse CDT error: “make: *** [src/test2.o] Error 127”

cygwineclipseeclipse-cdtmakefile

On Windows XP I've installed Eclipse CDT. I've installed cygwin including make, gcc, g++, and gdb. I've added C:\cygwin\bin to the windows path variable.

When I create the default HelloWorld project in Eclipse and try to build, I get the following text in the console:

make all

make: echo: Command not found

make: *** [src/test3.o] Error 127

If I try make at the command line, then all's well.

Other clues:

  • Note that I added C:\cygwin\bin to the path rather than C:\cygwin\usr\bin because I didn't find my GNU toolchain in \usr\bin but in \bin. This seems to contradict some online documentation. Stranger still, when I type which make in the command window (not cygwin bash), it reads /usr/bin/make !
  • I might have installed a new version of cygwin over an old version. I noticed some warnings about this, but since nothing seemed to be wrong with cygwin once complete (and further, since make from the cygwin bash works ok), I didn't dig deeper here.

(Note: there is a related question that I didn't find helpful. Perhaps it's answer was over my head.)

Best Answer

I had the same problem using Eclipse CDT (Juno) under Lubuntu 12.10.

The following fixed it:

  1. Terminal: executed which make --> /usr/bin/make
  2. Terminal: executed which echo --> /bin/echo
  3. Eclipse: Under Project Properties > C/C++ Build > Environment, I made sure the contents of the PATH variable were /usr/bin:/bin, this is, the full path for make and echo, respectively.