Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8966551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:02:54+00:00 2026-06-15T17:02:54+00:00

Alright, this is for a school project where I am supposed to complete a

  • 0

Alright, this is for a school project where I am supposed to complete a skeleton program provided by the professor. Here is the makefile as provided to me:

db: db.o students.o courses.o enrolls.o
    cc db.o students.o courses.o enrolls.o -o db
db.o: db.c types.h students.h courses.h enrolls.h db.h
    cc -c db.c
students.o: students.c types.h students.h
    cc -c students.c
courses.o: courses.c types.h courses.h
    cc -c courses.c
enrolls.o: enrolls.c types.h students.h courses.h enrolls.h
    cc -c enrolls.c

Now, this worked fine in the commandline (with gcc) and in Dev C++, but when I tried to use Netbeans it threw an error, saying something about the clean command. So, I added this line:

clean:
    rm -f *.exe *.o

to the end of the file, and it worked fine (in Netbeans). But, it still won’t work in Eclipse CDT. It gives this error:

Description Resource    Path    Location    Type
make: *** No rule to make target `all'.  Stop.  Course Project          C/C++ Problem

So, I tried adding

all:db

to the top, but then it throws this error:

Description Resource    Path    Location    Type
make: *** [db] Error 1  Course Project          C/C++ Problem

So, now I’m at a loss for what to do. I’ve Googled around, but nothing has seemed to work yet. Any ideas on how to change this makefile so it works in Eclipse?

Here is the makefile in its current (non-functional) form:

all:db

db: db.o students.o courses.o enrolls.o
    cc db.o students.o courses.o enrolls.o -o db
db.o: db.c types.h students.h courses.h enrolls.h db.h
    cc -c db.c
students.o: students.c types.h students.h
    cc -c students.c
courses.o: courses.c types.h courses.h
    cc -c courses.c
enrolls.o: enrolls.c types.h students.h courses.h enrolls.h
    cc -c enrolls.c
clean:
    rm -f *.exe *.o
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:02:55+00:00Added an answer on June 15, 2026 at 5:02 pm

    As far as I know, Eclipse use gnu make/gcc as a default build toolchain. So if your makefile works in a shell it should work in Eclipse. The first error you mention just points out that Eclipse build with the default command “make all”. Adding ‘all: db’ should have corrected this problem. As @Bug Catcher said you should have a space between ‘all:’ and ‘db’. You can also add a .PHONY statement :

    .PHONY: all db clean
    
    all: db
        @echo "Done !"
    
    # [...]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright I don't see why this isnt working. It seems pretty simple. Here is
Alright. I'm attempting to complete a school assignment and cannot for the life of
Alright so this is my current setup for a makefile. There are files which
Alright - so I had a guy (in a school project - don't panic)
Alright this is my first day with JQuery so have fun with these functions
Alright so this problem has been breaking my brain all day today. The Problem:
Alright I know this is more than likely a amateur question but I have
Alright, this is driving me nuts because my regex is working on Rubular, but
Alright, this one's interesting. I have a solution, but I don't like it. The
Alright, this specific layout is just annoying me. And can't seem to find a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.