libeasymcp2221 2.0.3
mcp2221_export.h
Go to the documentation of this file.
1
6#ifndef MCP2221_EXPORT_H
7#define MCP2221_EXPORT_H
8
9/*
10 * Public symbol visibility.
11 *
12 * LIBEASYMCP2221_BUILDING_LIBRARY is defined only while compiling the shared
13 * library. LIBEASYMCP2221_STATIC is defined for static builds and must also be
14 * defined by Windows consumers that link the static library directly.
15 */
16
24#if defined(_WIN32) || defined(__CYGWIN__)
25# if defined(LIBEASYMCP2221_BUILDING_LIBRARY)
26# define MCP2221_API __declspec(dllexport)
27# elif defined(LIBEASYMCP2221_STATIC)
28# define MCP2221_API
29# else
30# define MCP2221_API __declspec(dllimport)
31# endif
32#elif defined(__GNUC__) || defined(__clang__)
33# define MCP2221_API __attribute__((visibility("default")))
34#else
35# define MCP2221_API
36#endif
37
51#ifdef __cplusplus
52# define MCP2221_BEGIN_DECLS extern "C" {
53# define MCP2221_END_DECLS }
54#else
55# define MCP2221_BEGIN_DECLS
56# define MCP2221_END_DECLS
57#endif
58
59#endif /* MCP2221_EXPORT_H */