The Intel
By default, the libraries are linked as follows:
This approach
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 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 myprog.cpp
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 myprog.cpp
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.