# o

Specifies the name for an output file.

## Syntax

Linux: | -o filename

macOS: | -o filename

Windows: | None

## Arguments

filename | Is the name for the output file. The space before filename is optional.

## Default

OFF | The compiler uses the default file name for an output file.

## Description

This option specifies the name for an output file as follows:

- If -c is specified, it specifies the name of the generated object file.

- If -S is specified, it specifies the name of the generated assembly listing file.

- If -preprocess-only or -P is specified, it specifies the name of the generated preprocessor file.

Otherwise, it specifies the name of the executable file.

## IDE Equivalent

None

## Alternate Options

Linux and macOS: None

Windows: /exe

Parent topic: Output, Debug, and Precompiled Header Options

## See Also

object compiler option
exe compiler option