How to configure makefile in eclipse (C ++)?

I have a project in Eclipse and I want to use my own makefile. I went to

project → properties → C / C ++ Build

and unverified "Automatic file creation." I have a makefile named Makefile in the base directory of the project, which simply contains:

 all: g++ *.cpp -o Simulator.exe 

When I try to build, I get the following error:

Building the MinGW GCC configuration for the CacheOptimization project

(Cannot start the make program: startup failed)

How can I fix this and compile my code eclipse?

+6
c ++ windows eclipse-cdt makefile
source share
2 answers

You probably haven't configured MINGW correctly, and Eclipse cannot run make. This may be useful: Configuring the compiler

+2
source share

Or:

  • install the MSys package, which includes make along with other useful tools (recommended),
  • or look into your project settings under C/C++ Build and change the build command from make to mingw32-make , which is distributed as part of MinGW.
+1
source share

All Articles