Output Files

The output produced by the ifort command includes:

You control the production of these files by specifying the appropriate options on the command line.

The compiler generates a temporary object file for each source file, unless you specify the -c option. The linker is then invoked to link the object files into one executable program file and the temporary object files are deleted.

If you specify the -c option, the object files are created and retained in the current working directory. You must link the object files later by using a separate ifort command. This allows incremental compilation of a large application, perhaps by means of a makefile processed by the make command.

If fatal errors are encountered during compilation, or if you specify certain options such as -c, linking does not occur.

Note

To allow optimization across all objects in the program, use the -ipo option.

To specify a file name for the executable program file (other than a.out), use the -o output option, where output specifies the file name. The following command requests a file name of prog1.out for the source file test1.f:

ifort -o prog1.out test1.f

If you specify the -c option with the -o output option, you rename the object file (not the executable program file). If you specify -c and omit the -o output option, the compiler names the object files with a .o suffix substituted for the source file suffix.

Note

You cannot use -c and -o together with multiple source files.