object

Specifies the name for an object file.

IDE Equivalent

Windows: Output Files > Object File Name

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64, IA-64 architectures

Syntax

Linux and Mac OS X:

None

Windows:

/object:file

Arguments

file

Is the name for the object file. It can be a file or directory name. A directory name must be followed by a backslash (\). If a special character appears within the file name or directory name, the file name or directory name must appear within quotes. To be safe, you should consider any non-ASCII numeric character to be a special character.

Default

OFF

An object file has the same name as the name of the first source file and a file extension of .obj.

Description

This option specifies the name for an object file.

If you specify this option and you omit /c or /compile-only, the /object option gives the object file its name.

On Linux and Mac OS X systems, this option is equivalent to specifying option -ofile -c.

Alternate Options

Linux and Mac OS X: None

Windows: /Fo

Example

The following command shows how to specify a directory:

ifort /object:directorya\ end.f

If you do not add the backslash following a directory name, an executable is created. For example, the following command causes the compiler to create directorya.exe:

ifort /object:directorya end.f

The following commands show how to specify a subdirectory that contains a special character:

ifort /object:"blank subdirectory"\ end.f

ifort /object:"c:\my_directory"\ end.f

See Also