Search code examples
cwindowseclipsemakefileeclipse-cdt

Could not find configuration file /etc/startup.mk


I want to develop a simple C application for learning purposes using Eclipse (Juno) CDT.

For that, I created the sample project provided in the IDE that creates a simple Hello World executable.

But when I want to build the project, the following errors comes up:

make: all
make: Error -- Could not find configuration file /etc/startup.mk

What does this mean? I can't find a file named like this anywhere on my system. Curiously enough, it works on my OS X with the same setup perfectly. Just not on my Windows machine.

What is going wrong here?

Edit: make -V show the following output:

D:\>make -V
make - Version 7.0 build 1182

Built-in Rules (cannot be changed):
        OS:=NT
        .IMPORT .IGNORE : ROOTDIR
        .MAKEFILES:makefile
        .SOURCE : .NULL
        @B = $(@:b)
        @D = $(@:d)
        @F = $(@:f)
        %B = $(%:b)
        %D = $(%:d)
        %F = $(%:f)
        *B = $(*:b)
        *D = $(*:d)
        *F = $(*:f)
        <B = $(<:b)
        <D = $(<:d)
        <F = $(<:f)
        ?B = $(?:b)
        ?F = $(?:f)
        ?D = $(?:d)
System Configuration:
        SWITCHAR = /
        OSVERSION = 01
        OSRELEASE = 5
        DIRSEPSTR = /\:
        SHELL = /mksnt/sh.exe
        SHELLFLAGS = /c
        SHELLMETAS =
        GROUPSHELL = /mksnt/sh.exe
        GROUPFLAGS =
        GROUPSUFFIX =
        MAKEDIR = D:/
        PWD = D:/

Solution

  • The make executable that is in your path is not the GNU make that eclipse expects and needs. It is probably a tool that comes with some other product -- make is a pretty common name. If your windows is not too old, you could try where make to locate the culprit and remove it from your path. Once you have done that, eclipse will be able to the GNU make by itself if you used the standard installation of your toolchain, or you could add it to your path. Alternatively, you can customize the eclipse build settings and explicitly point it to the make you want to use.

    The make you want is probably in C:\MinGW\msys\1.0\bin, but could be somewhere else depending on how you installed the toolchain. There is also a mingw32-make in C:\MinGW\bin -- all assuming that you are using MinGW