MantisBase v0.4.9
Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1
8
9#ifndef MANTISBASE_EXPORT_H
10#define MANTISBASE_EXPORT_H
11
12#ifdef MANTISBASE_STATIC
13# define MANTISBASE_API
14#else
15# ifdef MantisBase_EXPORTS
16# if defined(_WIN32) && !defined(__GNUC__) && !defined(__clang__)
17# define MANTISBASE_API __declspec(dllexport)
18# else
19 // MinGW (GCC and llvm-mingw clang) must not mark symbols dllexport.
20 // One dllexport turns off "export every global". GNU ld can be forced
21 // back with --export-all-symbols; lld still drops the drogon and soci
22 // vtables the Python extension imports, and the first use segfaults.
23 // visibility("default") keeps the public API exported, and with no
24 // dllexport the linker auto-exports the rest.
25# define MANTISBASE_API __attribute__((visibility("default")))
26# endif
27# else
28# ifdef _WIN32
29# define MANTISBASE_API __declspec(dllimport)
30# else
31# define MANTISBASE_API
32# endif
33# endif
34#endif
35
36#endif // MANTISBASE_EXPORT_H