Syntax

-c

Description

All named files are compiled to object code modules, but are not linked. You can use the -o option to name the output if you just supply one input filename.

Example

The following command compiles file1.c and file4.c to produce the object files file1.o and file4.hzo.

cc -c file1.c file4.c 

The following command compiles file1.c and produces the object file obj/file1.hzo.

cc -c file.c -o obj/file1.o