layout: doc title: “Starboard Module Reference: export.h”

Provides macros for properly exporting or importing symbols from shared libraries.

Macros

Note that this macro's definition varies depending on the values of one or more other variables.

Note that this macro's definition varies depending on the values of one or more other variables.

Note that this macro's definition varies depending on the values of one or more other variables.

Functions

means

Description

COMPONENT_BUILD is defined when generating shared libraries for each project,

Declaration

// rather than static libraries. This means we need to be careful about
// EXPORT/IMPORT.
// SB_IS_LIBRARY is defined when building Starboard as a shared library to be
// linked into a client app. In this case, we want to explicitly define
// EXPORT/IMPORT so that Starboard's symbols are visible to such clients.
#if defined(STARBOARD_IMPLEMENTATION)
// STARBOARD_IMPLEMENTATION is defined when building the Starboard library
// sources, and shouldn't be defined when building sources that are clients of
// Starboard.
#else  // defined(STARBOARD_IMPLEMENTATION)
#endif
#else  // defined(COMPONENT_BUILD) || SB_IS(LIBRARY)
#define SB_EXPORT
#define SB_EXPORT_PRIVATE
#define SB_IMPORT
#endif  // defined(COMPONENT_BUILD)
#endif  // STARBOARD_EXPORT_H_

Parameters