ZXC 0.15.0
High-performance asymmetric lossless compression library
Loading...
Searching...
No Matches
zxc_export.h File Reference

Platform-specific symbol visibility macros. More...

Go to the source code of this file.

Macros

#define ZXC_DEPRECATED_EXPORT   ZXC_EXPORT ZXC_DEPRECATED
 Combines ZXC_EXPORT with ZXC_DEPRECATED.
 
#define ZXC_DEPRECATED_NO_EXPORT   ZXC_NO_EXPORT ZXC_DEPRECATED
 Combines ZXC_NO_EXPORT with ZXC_DEPRECATED.
 

Detailed Description

Platform-specific symbol visibility macros.

ZXC_EXPORT, ZXC_NO_EXPORT and ZXC_DEPRECATED decide which symbols leave the shared library.

  • Define ZXC_STATIC_DEFINE when building or consuming ZXC as a static library: it drops the import/export annotations entirely.
  • Building the shared library, the CMake target defines zxc_lib_EXPORTS for you, which selects dllexport / visibility("default").
  • Consuming it, neither macro is defined, so the header picks visibility("default") on ELF and no annotation on Windows.

On Windows dllimport is opt-in via ZXC_DLL_IMPORT, because an unannotated declaration still links against a DLL (through a call thunk), while dllimport against a static library fails on unresolved __imp_zxc_*. CMake, Meson and pkg-config set the right macro for you.

Definition in file zxc_export.h.