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

ID 767253
Date 9/08/2022
Public

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

Document Table of Contents

shared

Tells the compiler to produce a dynamic shared object instead of an executable.

Syntax

Linux:

-shared

Windows:

None

Arguments

None

Default

OFF

The compiler produces an executable.

Description

This option tells the compiler to produce a dynamic shared object (DSO) instead of an executable. This includes linking in all libraries dynamically and passing -shared to the linker.

You must specify option fpic for the compilation of each object file you want to include in the shared library.

NOTE:

When you specify option shared, the Intel® libraries are linked dynamically. If you want them to be linked statically, you must also specify option static-intel.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent
None
Alternate Options

None

See Also