<p>A makefile is a text file that is referenced by the make command that describes the building of targets, and contains information such as source-level dependencies and build-order dependencies. </p>
<p>The CDT can generate a makefile for you, such projects are called Managed Make projects. Some projects, known as Standard Make projects, allow you to define your own makefile.</p>
<p>Most probably, the build command (by default "make") is not on your path. You can put it on your path and restart Eclipse.<br>
You can also change the build command to something that is on your path. If you are using MinGW tools to compile, you should replace the build command with "mingw32-make".</p>
<p>By default, the make program looks for a file most commonly called "Makefile" or "makefile".
If it cannot find such a file in the working directory, or if that file is empty or the file does not
contain rules for the command line goals ("clean" and "all" in this case), it will normally fail
with an error message similar to those shown. </p>
<p>If you already have a valid Makefile, you may need to change the working directory of your build. The default working directory for the build command is the project's root directory. You can change this by specifying an alternate Build Directory in the Make Project properties.
Or, if your Makefile is named something else (eg. <spanclass="typewriter">buildFile.mk</span>), you can specify the name by setting the default Build command to <spanclass="typewriter">make -f buildFile.mk</span>.</p>
<p>If you do not have a valid Makefile, create a new file named Makefile in the root directory. You can then add the contents of the sample Makefile (above), and modify it as appropriate.</p>
<p>The likely culprit here is that g++ is not on your Path.<br>
<p>The Error 255 is produced by make as a result of its command shell not being able to find a command for a particular rule.<br>
Messages from the standard error stream (the lines saying Error 255) and standard output stream (all the other lines) are merged in the Console view here.</p>
make (e=2): The system cannot find the file specified.
mingw32-make: *** [clean] Error 2
rm -f Test1.o Test2.o Main.o test_me.exe
</pre>
<p>This means that mingw32-make was unable to find the utility "rm". Unfortunately, MinGW does not come with "rm". To correct this, replace the clean rule in your Makefile with:</p>
<p>The leading minus sign tells make to consider the clean rule to be successful even if the del command returns failure. This may be acceptable since the del command will fail if the specified files to be deleted do not exist yet (or anymore).</p>