Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

File Extensions

Input File Extensions

The Intel® Fortran Compiler interprets the type of each input file by the file name extension.

The file extension determines if a file gets passed to the compiler or to the linker. The following types of files are used with the compiler:

  • Files passed to the compiler: .f90, .for, .f, .fpp, .i, .i90, .ftn

    Typical Fortran source files have a file extension of .f90, .for, and .f. When editing your source files, you need to choose the source form, either free-source form or fixed-source form (or a variant of fixed form called tab form). You can use a compiler option to specify the source form used by the source files (see the description for the free or fixed compiler option) or you can use specific file extensions when creating or renaming your files. For example, the compiler assumes that files with an extension of:

    • .f90 or .i90 are free-form source files.
    • .f, .for, .ftn, or .i are fixed-form (or tab-form) files.

  • Files passed to the linker: .a, .lib, .obj, .o, .exe, .res, .rbj, .def, .dll

The most common file extensions and their interpretations are:

File Name (OS Agnostic)

File Name for Linux and macOS

File Name for Windows

Interpretation

Action

 

file.a

file.lib

Object library

Passed to the linker.

file.f

file.for

file.ftn

file.i

   

Fortran fixed-form source

Compiled by the Intel® Fortran Compiler.

file.fpp

On Linux, the file names have the following uppercase extensions:

file.FPP

file.F

file.FOR

file.FTN

 

Fortran fixed-form source

Automatically preprocessed by the Intel® Fortran preprocessor fpp; then compiled by the Intel® Fortran Compiler.

file.f90

file.i90

   

Fortran free-form source

Compiled by the Intel® Fortran Compiler.

 

file.F90

 

Fortran free-form source

Automatically preprocessed by the Intel® Fortran preprocessor fpp; then compiled by the Intel® Fortran Compiler.

 

file.s

file.asm

Assembly file

Passed to the assembler.

 

file.o

file.obj

Compiled object file

Passed to the linker.

When you compile from the command line, you can use the compiler configuration file to specify default directories for input libraries. To specify additional directories for input files, temporary files, libraries, and for the files used by the assembler and the linker, use compiler options that specify output file and directory names.

Output File Extensions on Windows

On Windows operating systems, many compiler options allow you to specify the name of the output file being created. These compiler options are summarized in the table below.

If you specify only a file name without an extension, a default extension is added for the file.

Compiler Option

Default File Extension

/Fafile

.ASM

/dll:file

.DLL

/exe:file

.EXE

/map:file

.MAP