VAPoR  0.1
common.h
Go to the documentation of this file.
1 
2 #ifdef WIN32
3 #pragma warning(disable : 4018 4244 4267 4305)
4 #ifdef COMMON_EXPORTS
5 #define COMMON_API __declspec(dllexport)
6 #else
7 #define COMMON_API __declspec(dllimport)
8 #endif
9 
10 #ifdef VDF_EXPORTS
11 #define VDF_API __declspec(dllexport)
12 #else
13 #define VDF_API __declspec(dllimport)
14 #endif
15 
16 #ifdef FLOW_EXPORTS
17 #define FLOW_API __declspec(dllexport)
18 #else
19 #define FLOW_API __declspec(dllimport)
20 #endif
21 
22 #ifdef PARAMS_EXPORTS
23 #define PARAMS_API __declspec(dllexport)
24 #else
25 #define PARAMS_API __declspec(dllimport)
26 #endif
27 
28 #ifdef RENDER_EXPORTS
29 #define RENDER_API __declspec(dllexport)
30 #else
31 #define RENDER_API __declspec(dllimport)
32 #endif
33 
34 #ifdef UDUNITS2_EXPORTS
35 #define UDUNITS2_API __declspec(dllexport)
36 #else
37 #define UDUNITS2_API __declspec(dllimport)
38 #endif
39 
40 #ifdef GRIBAPI_EXPORTS
41 #define GRIBAPI_API __declspec(dllexport)
42 #else
43 #define GRIBAPI_API __declspec(dllimport)
44 #endif
45 
46 #ifdef JPEG_EXPORTS
47 //Slightly different definitions for jpeg project:
48 # define JPEG_GLOBAL(type) __declspec(dllexport) type
49 # define JPEG_EXTERN(type) extern __declspec(dllexport) type
50 #else
51 # define JPEG_GLOBAL(type) __declspec(dllimport) type
52 #ifdef __cplusplus
53 # define JPEG_EXTERN(type) extern "C" __declspec(dllimport) type
54 #else
55 # define JPEG_EXTERN(type) extern __declspec(dllimport) type
56 #endif
57 #endif //JPEG_EXPORTS
58 
59 #else //not WIN32, everything is exported
60 #define COMMON_API
61 #define VDF_API
62 #define FLOW_API
63 #define PARAMS_API
64 #define RENDER_API
65 #define GRIBAPI_API
66 #define JPEG_GLOBAL(type) type
67 //Assume all outside projects depending on JPEG are C++
68 #ifdef JPEG_EXPORTS
69 #define JPEG_EXTERN(type) extern type
70 #else
71 #define JPEG_EXTERN(type) extern "C" type
72 #endif //ifeq JPEG_EXPORTS
73 #endif //end !Win32