PLplot: pldll.h Source File

PLplot 5.10.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pldll.h
Go to the documentation of this file.
1 #ifndef __PL_DLL_H
2 #define __PL_DLL_H
3
4 #ifdef USINGDLL
5 #if defined ( WIN32 )
6 // Visual C/C++, Borland, MinGW and Watcom
7 #if defined ( __VISUALC__ ) || defined ( _MSC_VER ) || defined ( __BORLANDC__ ) || defined ( __GNUC__ ) || defined ( __WATCOMC__ )
8 #define PLDLLEXPORT __declspec( dllexport )
9 #define PLDLLIMPORT __declspec( dllimport )
10 #else
11 #define PLDLLEXPORT
12 #define PLDLLIMPORT
13 #endif
14 #elif defined ( __CYGWIN__ )
15 #define PLDLLEXPORT __declspec( dllexport )
16 #define PLDLLIMPORT __declspec( dllimport )
17 #elif defined ( __GNUC__ ) && __GNUC__ > 3
18 // Follow ideas in http://gcc.gnu.org/wiki/Visibility for GCC version 4.x
19 // The following forces exported symbols specifically designated with
20 // PLDLLEXPORT to be visible.
21 #define PLDLLEXPORT __attribute__ ( ( visibility( "default" ) ) )
22 #define PLDLLIMPORT
23 #endif
24 #endif
25
26 // For an unknown compiler or static built we clear the macros
27 #ifndef PLDLLEXPORT
28 #define PLDLLEXPORT
29 #define PLDLLIMPORT
30 #endif
31
32 // The IMPEXP macros will always be set to DLLIMPORT (even for
33 // the static library, but DLLIMPORT is empty in this case), if
34 // cmake didn't set the corresponding macro xxxx_EXPORTS when the
35 // corresponding library is built (DLLIMPEXP is set to DLLEXPORT
36 // then)
37 #if defined ( plplotd_EXPORTS )
38 #define PLDLLIMPEXP PLDLLEXPORT
39 #define PLDLLIMPEXP_DATA( type ) PLDLLEXPORT type
40 #else
41 #define PLDLLIMPEXP PLDLLIMPORT
42 #define PLDLLIMPEXP_DATA( type ) PLDLLIMPORT type
43 #endif
44
45 // for dynamic drivers set the macros correctly. If a shared library is built,
46 // but dyanmic drivers disabled, the driver dll macros are the same as the
47 // plplot dll macros
48 #ifdef ENABLE_DYNDRIVERS
49 #if defined ( aqt_EXPORTS ) || defined ( cairo_EXPORTS ) || defined ( cgm_EXPORTS ) || \
50 defined ( dg300_EXPORTS ) || defined ( gd_EXPORTS ) || defined ( gcw_EXPORTS ) || \
51 defined ( hpgl_EXPORTS ) || defined ( impress_EXPORTS ) || defined ( linuxvga_EXPORTS ) || \
52 defined ( ljii_EXPORTS ) || defined ( ljiip_EXPORTS ) || defined ( mem_EXPORTS ) || \
53 defined ( ntk_EXPORTS ) || defined ( null_EXPORTS ) || defined ( pbm_EXPORTS ) || \
54 defined ( pdf_EXPORTS ) || defined ( plmeta_EXPORTS ) || defined ( ps_EXPORTS ) || \
55 defined ( pstex_EXPORTS ) || defined ( psttf_EXPORTS ) || defined ( svg_EXPORTS ) || \
56 defined ( tek_EXPORTS ) || defined ( tk_EXPORTS ) || defined ( tkwin_EXPORTS ) || \
57 defined ( wingcc_EXPORTS ) || defined ( wxwidgets_EXPORTS ) || defined ( xfig_EXPORTS ) || \
58 defined ( xwin_EXPORTS ) || defined ( qt_EXPORTS )
59 #define PLDLLIMPEXP_DRIVER PLDLLEXPORT
60 #define PLDLLIMPEXP_DRIVER_DATA( type ) PLDLLEXPORT type
61 #else
62 #define PLDLLIMPEXP_DRIVER PLDLLIMPORT
63 #define PLDLLIMPEXP_DRIVER_DATA( type ) PLDLLIMPORT type
64 #endif
65 #else
66 #define PLDLLIMPEXP_DRIVER PLDLLIMPEXP
67 #define PLDLLIMPEXP_DRIVER_DATA( type ) PLDLLIMPEXP_DATA( type )
68 #endif
69
70 #if defined ( plplotcxxd_EXPORTS )
71 #define PLDLLIMPEXP_CXX PLDLLEXPORT
72 #define PLDLLIMPEXP_CXX_DATA( type ) PLDLLEXPORT type
73 #else
74 #define PLDLLIMPEXP_CXX PLDLLIMPORT
75 #define PLDLLIMPEXP_CXX_DATA( type ) PLDLLIMPORT type
76 #endif
77
78 #if defined ( plplotf95cd_EXPORTS )
79 #define PLDLLIMPEXP_F95C PLDLLEXPORT
80 #define PLDLLIMPEXP_F95C_DATA( type ) PLDLLEXPORT type
81 #else
82 #define PLDLLIMPEXP_F95C PLDLLIMPORT
83 #define PLDLLIMPEXP_F95C_DATA( type ) PLDLLIMPORT type
84 #endif
85
86 #if defined ( plplotwxwidgetsd_EXPORTS )
87 #define PLDLLIMPEXP_WX PLDLLEXPORT
88 #define PLDLLIMPEXP_WX_DATA( type ) PLDLLEXPORT type
89 #else
90 #define PLDLLIMPEXP_WX PLDLLIMPORT
91 #define PLDLLIMPEXP_WX_DATA( type ) PLDLLIMPORT type
92 #endif
93
94 #if defined ( tclmatrixd_EXPORTS )
95 #define PLDLLIMPEXP_TCLMAT PLDLLEXPORT
96 #define PLDLLIMPEXP_TCLMAT_DATA( type ) PLDLLEXPORT type
97 #else
98 #define PLDLLIMPEXP_TCLMAT PLDLLIMPORT
99 #define PLDLLIMPEXP_TCLMAT_DATA( type ) PLDLLIMPORT type
100 #endif
101
102 #if defined ( plplottcltk_Maind_EXPORTS ) | defined ( plplottcltkd_EXPORTS )
103 #define PLDLLIMPEXP_TCLTK PLDLLEXPORT
104 #define PLDLLIMPEXP_TCLTK_DATA( type ) PLDLLEXPORT type
105 #else
106 #define PLDLLIMPEXP_TCLTK PLDLLIMPORT
107 #define PLDLLIMPEXP_TCLTK_DATA( type ) PLDLLIMPORT type
108 #endif
109
110 #if defined ( plplotgnome2d_EXPORTS )
111 #define PLDLLIMPEXP_GNOME2 PLDLLEXPORT
112 #define PLDLLIMPEXP_GNOME2_DATA( type ) PLDLLEXPORT type
113 #else
114 #define PLDLLIMPEXP_GNOME2 PLDLLIMPORT
115 #define PLDLLIMPEXP_GNOME2_DATA( type ) PLDLLIMPORT type
116 #endif
117
118 #if defined ( cplplotcanvasmodule_EXPORTS )
119 #define PLDLLIMPEXP_CPLPLOTCANVASMODULE PLDLLEXPORT
120 #define PLDLLIMPEXP_CPLPLOTCANVASMODULE_DATA( type ) PLDLLEXPORT type
121 #else
122 #define PLDLLIMPEXP_CPLPLOTCANVASMODULE PLDLLIMPORT
123 #define PLDLLIMPEXP_CPLPLOTCANVASMODULE_DATA( type ) PLDLLIMPORT type
124 #endif
125
126 #if defined ( plplot_widgetmodule_EXPORTS )
127 #define PLDLLIMPEXP_PLPLOT_WIDGETMODULE PLDLLEXPORT
128 #define PLDLLIMPEXP_PLPLOT_MODULE_DATA( type ) PLDLLEXPORT type
129 #else
130 #define PLDLLIMPEXP_PLPLOT_MODULE PLDLLIMPORT
131 #define PLDLLIMPEXP_PLPLOT_MODULE_DATA( type ) PLDLLIMPORT type
132 #endif
133
134 #if defined ( plplotqtd_EXPORTS )
135 #define PLDLLIMPEXP_QT PLDLLEXPORT
136 #define PLDLLIMPEXP_QT_DATA( type ) PLDLLEXPORT type
137 #else
138 #define PLDLLIMPEXP_QT PLDLLIMPORT
139 #define PLDLLIMPEXP_QT_DATA( type ) PLDLLIMPORT type
140 #endif
141
142 #if defined ( plplot_pyqt4_EXPORTS )
143 #define PLDLLIMPEXP_PYQT4 PLDLLEXPORT
144 #define PLDLLIMPEXP_PYQT4_DATA( type ) PLDLLEXPORT type
145 #else
146 #define PLDLLIMPEXP_PYQT4 PLDLLIMPORT
147 #define PLDLLIMPEXP_PYQT4_DATA( type ) PLDLLIMPORT type
148 #endif
149
150 #endif // __PL_DLL_H