Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that I can copy paste this command in my terminal, but how do I type this?

make ex1
cc ex1.c -o ex1

Typing it all on one line produces the following:

make: Nothing to be done for ex1.
make: *** No rule to make target cc.  Stop.
share|improve this question
up vote 2 down vote accepted

You should type only make ex1 do not add cc ex1.c -o ex1 , make will run that command.

If you are getting make: Nothing to be done for ex1 error means you already have a ex1 compiled file in your directory where ex1.c is present. You need to delete/move/rename that file because make will try to create file named ex1 (same name) if file with same name is already there it gives error. That why its giving error.

You can use directly cc filename.c -o filename(anyname) which is the same.

share|improve this answer
Ah I see now, the second line is a product of the command. I was following a tutorial and the directions weren't clear. – user304837 Jul 12 '14 at 13:07
This is very helpful, thank you! – user304837 Jul 12 '14 at 13:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.