wxChartDir  2.0.1
wxchartviewer_defs.h
1 /*
2 ** Name: wxchartviewer_defs.h
3 ** Purpose: wxChartViewer defines
4 ** Author: Ulrich Telle
5 ** Created: 2018-07-09
6 ** Copyright: (C) 2018-2021, Ulrich Telle
7 ** License: LGPL - 3.0 + WITH WxWindows - exception - 3.1
8 */
9 
11 
12 #ifndef WXCHARTDIR_WXCHARTVIEWER_DEFS_H
13 #define WXCHARTDIR_WXCHARTVIEWER_DEFS_H
14 
15 // Unfortunately we can't always just rely on WXEXPORT because it wasn't
16 // defined correctly when using ELF visibility for symbol hiding in wx 2.8 that
17 // we still support, so we have to use our own symbol. This part, as well as
18 // the definition of WXCHARTVIEWER_HAVE_VISIBILITY in configure, should be dropped
19 // when wx 2.8 is not supported any longer.
20 #ifdef WXCHARTVIEWER_HAVE_VISIBILITY
21  #define WXCHARTVIEWER_EXPORT __attribute__ ((visibility("default")))
22 #else
23  #define WXCHARTVIEWER_EXPORT WXEXPORT
24 #endif
25 
26 #if defined(WXMAKINGDLL_WXCHARTVIEWER)
27  #define WXDLLIMPEXP_WXCHARTVIEWER WXCHARTVIEWER_EXPORT
28  #define WXDLLIMPEXP_DATA_WXCHARTVIEWER(type) WXCHARTVIEWER_EXPORT type
29 #elif defined(WXUSINGDLL_WXCHARTVIEWER)
30  #define WXDLLIMPEXP_WXCHARTVIEWER WXIMPORT
31  #define WXDLLIMPEXP_DATA_WXCHARTVIEWER(type) WXIMPORT type
32 #else // not making nor using DLL
33  #define WXDLLIMPEXP_WXCHARTVIEWER
34  #define WXDLLIMPEXP_DATA_WXCHARTVIEWER(type) type
35 #endif
36 
37 // GCC warns about using __declspec on forward declarations
38 // while MSVC complains about forward declarations without
39 // __declspec for the classes later declared with it. To hide this
40 // difference a separate macro for forward declarations is defined:
41 #if defined(HAVE_VISIBILITY) || (defined(__WINDOWS__) && defined(__GNUC__))
42  #define WXDLLIMPEXP_FWD_WXCHARTVIEWER
43 #else
44  #define WXDLLIMPEXP_FWD_WXCHARTVIEWER WXDLLIMPEXP_WXCHARTVIEWER
45 #endif
46 
47 #endif // WXCHARTDIR_WXCHARTVIEWER_DEFS_H