-o

Category

Output control

@PROCESS

None.

Purpose

Specifies a name for the output object, assembler, or executable file.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -o--name---------------------------------------------------><

Defaults

The default name for an executable file is a.out. The default name for an object or assembler source file is the same as the source file except that it has a .o or .s extension.

Usage

To choose the name for an object file, use this option in combination with the -c option. For an assembler source file, use it in combination with the -S option.

Rules

Except when you specify the -c or -S option, the -o option is passed directly to the ld command, instead of being processed by XL Fortran.

Examples

xlf95 t.f                    # Produces "a.out"
xlf95 -c t.f                 # Produces "t.o"
xlf95 -o test_program t.f    # Produces "test_program"
xlf95 -S -o t2.s t.f         # Produces "t2.s"