Linking

This topic describes the options that enable you to control and customize the linking with tools and libraries and define the output of the linking process. See the summary of linking options.

  Note
These options are specified at compile time and have effect at the linking time.

Options to Link to Tools and Libraries

The following options enable you to link to various tools and libraries:

-Bdynamic

Dynamically links libraries at run time. Compared to static linking, results in smaller executables.

-C90

Link with alternate I-O library for mixed output with the C language.

-i_dynamic

Enables to link the shared object versions of the Intel-provided libraries dynamically.

-lname

Link with a library indicated in name. For example, -lm indicates to link with the math library.

-Ldir

Instructs linker to search dir for libraries.

-posixlib

Enables or disable linking with POSIX library.

-shared

Instructs the compiler to build the Dynamic Shared Object (DSO) instead of an executable.

-static

Enables to link shared libraries (.so) statically.

-Vaxlib

Enable or disable linking with portability library.

Controlling Linking and its Output

-Ldir

Instruct linker to search  for dir libraries.

See Libraries for more information on using them.

Suppressing Linking

Use the -c option to suppress linking. Entering the following command produces the object files file.o and file2.o, but does not link these files to produce an executable file.

IA-32 compiler:

prompt>ifc -c file.f file2.f

Itanium(TM) compiler:

prompt>efc -c file.f file2.f

Note
The preceding command does not link these files to produce an executable file.