The output produced by the ifort command includes:
An object file, if you specify the -c (Linux OS and Mac OS X) or /c (Windows OS) option on the command line. An object file is created for each source file.
An executable file, if you omit the -c or /c option.
One or more module files (such as datadef.mod), if the source file contains one or more MODULE statements.
A shareable library (such as mylib.so on Linux OS, mylib.dylib on Mac OS X, ormylib.dll on Windows OS), if you use the -shared (Linux),-dynamiclib (Mac OS X) or /libs:dll (Windows OS) option.
Assembly files, if you use the -S (Linux OS and Mac OS X) or /S (Windows OS) option. This creates an assembly file for each source file.
You control the production of output files by specifying the appropriate compiler options on the command line or using the appropriate properties in the integrated development environment for Windows OS and Mac OS X.
For instance, if you do not specify the -c or /c option, the compiler generates a temporary object file for each source file. It then invokes the linker to link the object files into one executable program file and causes the temporary object files to be deleted.
If you specify the -c or /c option, object files are created and retained in the current working directory. You must link the object files later. You can do this by using a separate ifort command; alternatively, you can call the linker ( ld for Linux OS and Mac OS X or link for Windows OS) directly to link in objects. On Linux OS and Mac OS X systems, you can also call xild or use the archiver (ar) and xiar to create a library. For Mac OS X, you would use libtool to generate a library.
If fatal errors are encountered during compilation, or if you specify certain options such as -c or /c, linking does not occur.
The output files include the following:
Output File |
Extension |
How Created on the Command Line |
---|---|---|
Object file |
.o (Linux OS and Mac OS X) .obj (Windows OS) |
Created automatically. |
Executable file |
.out (Linux OS and Mac OS X) .exe (Windows OS) |
Do not specify -c or /c. |
Shareable library file |
.so (Linux OS) .dylib (Mac OS X) .dll (Windows OS) |
Specify -shared (Linux OS),-dynamiclib (Mac OS X) or /libs:dll (Windows OS) and do not specify -c or /c . |
Module file |
.mod |
Created if a source file being compiled defines a Fortran module (MODULE statement). |
Assembly file |
.s (Linux OS and Mac OS* X) .asm (Windows OS) |
Created if you specify the S option. An assembly file for each source file is created. |
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 the default) use the -o output (Linux OS and Mac OS X) or /exe:output (Windows OS) option, where output specifies the file name.
You cannot use the c and o options together with multiple source files.
Copyright © 1996-2010, Intel Corporation. All rights reserved.