Intel® Shared Libraries

The Intel® C++ Compiler links libraries statically at link time and dynamically at run time, the latter as dynamically-shared objects (DSO).

By default, the libraries are linked as follows:

Advantages of This Approach

This approach:

Shared Library Options

The main options used with shared libraries are -i_dynamic and -shared.

The -i_dynamic 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.

1. prompt>icc prog.c

This command produces the following results (default):

The statically linked libraries increase the size of the application binary, but do not need to be installed on the systems where the application runs.

2. prompt>icc -i_dynamic prog.c

This command links all of the above libraries dynamically. This has the advantage of reducing the size of the application binary, but it requires all the dynamic versions installed on the systems where the application runs.

The -shared option instructs the compiler to build a Dynamic Shared Object (DSO) instead of an executable. For more details, refer to the ld man page documentation.