Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 6/24/2024
Public
Document Table of Contents

Use Intel Shared Libraries

This content does not apply for SYCL.

By default, the Intel C++ libraries (libirc, libsvml, libimf, libirng) are linked in statically. When building a Dynamic Shared Object (DSO) using -shared, the Intel libraries are linked in dynamically.

Options for Shared Libraries

Option

Description

-fpic

Use the fpic option when building shared libraries. It is required for the compilation of each object file included in the shared library.

-shared-intel

Use the shared-intel option to link Intel libraries dynamically. This has the advantage of reducing the size of the application binary, but it also requires the libraries to be on the application's target system.

-shared

Use the shared option to link Intel-provided libraries dynamically. The shared option instructs the compiler to build a DSO instead of an executable. For more details, refer to the ld man page documentation.

-static-intel

Use -static-intel to link in the Intel libraries statically.

Options for Dynamic Link Library (DLL) for Windows

Option

Description

/LD, /LDd

Creates the dynamically linked library.

Produces a DLL. d indicates the debug version.

See Also