Syntax

-ar

Description

This switch instructs the compiler driver to archive all output files into a library. Using -ar implies -c.

Example

The following command compiles file1.c, file2.asm, and file3.c to object code and archives them into the library file libfunc.hza together with the object file file4.hzo.

cc -ar file1.c file2.asm file3.c file4.hzo -o libfunc.hza