Main MRPT website > C++ reference for MRPT 1.4.0
hmtslam_impexp.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 /* This file should be included from utils_defs.h only!
11 */
12 #ifndef _IAMINUTILSDEFS_H
13 #error Do not include this file manually
14 #endif
15 
16 /* This file defines macros for DLL import/export, required for
17  Windows only.
18 
19  Mostly all the definitions in this file are copied or at least based
20  on the file wx/dlimpexp.h, written by Vadim Zeitlin and published
21  under the wxWindows licence.
22 */
23 
24 #ifndef _HMTIMPEXP_H
25 #define _HMTIMPEXP_H
26 
27 #if defined(MRPT_OS_WINDOWS)
28  /*
29  __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
30  as VC++ and gcc
31  */
32 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
33 # define HMTEXPORT __declspec(dllexport)
34 # define HMTIMPORT __declspec(dllimport)
35 # else /* compiler doesn't support __declspec() */
36 # define HMTEXPORT
37 # define HMTIMPORT
38 # endif
39 #elif defined(MRPT_OS_OS2) /* was __WXPM__ */
40 # if defined (__WATCOMC__)
41 # define HMTEXPORT __declspec(dllexport)
42  /*
43  __declspec(dllimport) prepends __imp to imported symbols. We do NOT
44  want that!
45  */
46 # define HMTIMPORT
47 # elif defined(__EMX__)
48 # define HMTEXPORT
49 # define HMTIMPORT
50 # elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
51 # define HMTEXPORT _Export
52 # define HMTIMPORT _Export
53 # endif
54 #elif defined(MRPT_OS_APPLE)
55 # ifdef __MWERKS__
56 # define HMTEXPORT __declspec(export)
57 # define HMTIMPORT __declspec(import)
58 # endif
59 #elif defined(__CYGWIN__)
60 # define HMTEXPORT __declspec(dllexport)
61 # define HMTIMPORT __declspec(dllimport)
62 #endif
63 
64 /* for other platforms/compilers we don't anything */
65 #ifndef HMTEXPORT
66 # define HMTEXPORT
67 # define HMTIMPORT
68 #endif
69 
70 /*
71  HMTSLAM_IMPEXP maps to export declaration when building the DLL, to import
72  declaration if using it or to nothing at all if we are not compiling as DLL
73  */
74 #if defined(MRPT_BUILT_AS_DLL)
75 # if defined(mrpt_hmtslam_EXPORTS) /* Building the DLL */
76 # define HMTSLAM_IMPEXP HMTEXPORT
77 # else /* Using the DLL */
78 # define HMTSLAM_IMPEXP HMTIMPORT
79 # endif
80 #else /* not making nor using DLL */
81 # define HMTSLAM_IMPEXP
82 #endif
83 
84 #endif /* end of _UTILSIMPEXP_H */



Page generated by Doxygen 1.8.13 for MRPT 1.4.0 SVN: at Fri Mar 17 07:27:15 UTC 2017