The Intel® Fortran Compiler (both IA-32 and Itanium® compilers) links the libraries statically at link time and dynamically at the run time, the latter as dynamically-shared objects (DSO).
By default, the libraries are linked as follows:
Fortran, math and libcprts.a libraries are linked at link time, that is, statically.
libcxa.so is linked dynamically to conform to C++ application binary interface (ABI).
GNU and Linux* system libraries are linked dynamically.
This approach—
Enables to maintain the same model for both IA-32 and Itanium compilers.
Provides a model consistent with the Linux model where system libraries are dynamic and application libraries are static.
The users have the option of using dynamic versions of our libraries to reduce the size of their binaries if desired.
The users are licensed to distribute Intel-provided libraries.
The libraries libcprts.a and libcxa.so are C++ language support libraries used by Fortran when Fortran includes code written in C++.
The main options used with shared libraries are -i_dynamic and -shared.
The -i_dynamic compiler option directs the linker to use the shared object versions of the Intel-provided libraries dynamically. The comparison of the following commands illustrates the effects of this option.1. prompt>ifc myprog.f
This command produces the following results (default):
Fortran, math, libirc.a, and libcprts.a libraries are linked statically (at link time).
Dynamic version of libcxa.so is linked at run time.
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>ifc -i_dynamic myprog.f
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 dynamically-shared object instead of an executable. For more details, refer to the ld man page documentation.