Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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 at 13:07
    
This is very helpful, thank you! –  user304837 Jul 12 at 13:15

Your Answer

 
discard

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.