-1

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.

1 Answer 1

2

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.

1
  • 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, 2014 at 13:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .