The syntax of the cc command is:
% cc [options] filenames [libraries]...
where:
options represents one or more of the options described in "The cc Options"
filenames represents one or more files used in building the executable program
cc accepts a list of C source files and object files contained in the list of files specified by filenames. The resulting executable code is placed in a.out, unless the -o option is used. In this case, the code is placed in the file named by the -o option.
Use cc to compile and link any combination of the following:
C source files, with a .c suffix
C preprocessed source files, with a .i suffix
Object-code files, with .o suffixes
Assembler source files, with .s suffixes
After linking, cc places the linked files, now in executable code, into a file named a.out, or into the file specified by the -o option.
libraries represents any of a number of standard or user-provided libraries containing functions, macros, and definitions of constants.
See option -YP, dir to change the default directories used for finding libraries. dir is a colon-separated path list. The default library search order for cc is:
/opt/SUNWspro/SC5.0/lib
/usr/ccs/lib
/usr/lib
cc uses getopt to parse command-line options. Options are treated as a single letter or a single letter followed by an argument. See getopt(3c).