2

This command

gcc file.c -c 

outputs me this

file.o 

how to run above command so it outputs me object file with specified name for example file.dbg.o ?

4
  • 1
    -o nameofoutputfile. Commented Apr 1, 2016 at 19:57
  • @EOF I need to run it with -c not -o Commented Apr 1, 2016 at 20:01
  • @JoachimPileborg ? I looked it up online without success Commented Apr 1, 2016 at 20:02
  • 2
    @tomtom gcc -c file.c -o file.dbg.o aight? -o does not mean object or .o, it means output. Commented Apr 1, 2016 at 20:08

1 Answer 1

1

That's it:

 gcc -o file.dbg.o -c file.c 
Sign up to request clarification or add additional context in comments.

1 Comment

And if you're under linux/mac type in the terminal man gcc to view a list of all the possible options.