Linking

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

Option Description
-Ldirectory Instruct linker to search directory for libraries.
-Qoption,tool,list Passes an argument list to another program in the compilation sequence, such as the assembler or linker.
-shared This linker option instructs the compiler to build a Dynamic Shared Object (DSO) instead of an executable.

-i_dynamic

This linker option can be used to specify that all Intel-provided libraries should be linked dynamically. The comparison of the following commands illustrates the effects of this option.

-Bstatic

This linker option is used to statically link libraries at compile time. Compared to dynamic linking, results in larger executables.

-Bdynamic

This linker option is used to dynamically link libraries at run time. Compared to static linking, results in smaller executables.

Suppressing Linking

Use the -c option to suppress linking. For example, entering the following command produces the object files file.o and file2.o:

Note

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