Sun Studio 12: C++ User's Guide

A.2.65 –o filename

Sets the name of the output file or the executable file to filename.

A.2.65.1 Interactions

When the compiler must store template instances, it stores them in the template repository in the output file’s directory. For example, the following command writes the object file to ./sub/a.o and writes template instances into the repository contained within ./sub/SunWS_cache.


example% CC -o sub/a.o a.cc

The compiler reads from the template repositories corresponding to the object files that it reads. For example, the following command reads from ./sub1/SunWS_Cache and ./sub2/SunWS_cache, and, if necessary, writes to ./SunWS_cache.


example% CC sub1/a.o sub2/b.o

For more information, see 7.4 The Template Repository.

Warnings

The filename must have the appropriate suffix for the type of file to be produced by the compilation. It cannot be the same file as the source file, since the CC driver does not overwrite the source file.