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

ID 767253
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Use Intel Shared Libraries on Linux

This content does not apply for SYCL.

By default, the Intel® oneAPI DPC++/C++ Compiler links Intel® C++ libraries dynamically. The GNU/Linux system libraries are also linked dynamically.

Shared Library Options for Linux

Option

Description

-shared-intel

Use the shared-intel option to link Intel®-provided 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

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.

-fpic

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