Main MRPT website
>
C++ reference
mrpt
slam
slam/include/mrpt/slam/link_pragmas.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-2014, 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
#ifndef slam_link_pragmas_H
11
#define slam_link_pragmas_H
12
13
#include <mrpt/config.h>
14
#include <
mrpt/utils/boost_join.h
>
15
16
// ** Important! **
17
// In each mrpt library, search and replace:
18
// MRPT_XXX_EXPORT, MRPT_XXX_IMPORT
19
// SLAM_IMPEXP, mrpt_xxx_EXPORTS
20
21
// If we are building the DLL (_EXPORTS), do not link against the .lib files:
22
#if !defined(mrpt_slam_EXPORTS) && (defined(_MSC_VER) || defined(__BORLANDC__))
23
# if defined(_DEBUG)
24
# pragma comment (lib, BOOST_JOIN( BOOST_JOIN("libmrpt-slam",MRPT_VERSION_POSTFIX),"-dbg.lib"))
25
# else
26
# pragma comment (lib, BOOST_JOIN( BOOST_JOIN("libmrpt-slam",MRPT_VERSION_POSTFIX),".lib"))
27
# endif
28
#endif
29
30
31
32
33
/* The macros below for DLL import/export are required for Windows only.
34
Mostly all the definitions in this file are copied or at least slamd
35
on the file wx/dlimpexp.h, written by Vadim Zeitlin and published
36
under the wxWindows licence.
37
*/
38
#if defined(MRPT_OS_WINDOWS)
39
/*
40
__declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
41
as VC++ and gcc
42
*/
43
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
44
# define MRPT_SLAM_EXPORT __declspec(dllexport)
45
# define MRPT_SLAM_IMPORT __declspec(dllimport)
46
# else
/* compiler doesn't support __declspec() */
47
# define MRPT_SLAM_EXPORT
48
# define MRPT_SLAM_IMPORT
49
# endif
50
#elif defined(MRPT_OS_OS2)
/* was __WXPM__ */
51
# if defined (__WATCOMC__)
52
# define MRPT_SLAM_EXPORT __declspec(dllexport)
53
/*
54
__declspec(dllimport) prepends __imp to imported symbols. We do NOT
55
want that!
56
*/
57
# define MRPT_SLAM_IMPORT
58
# elif defined(__EMX__)
59
# define MRPT_SLAM_EXPORT
60
# define MRPT_SLAM_IMPORT
61
# elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
62
# define MRPT_SLAM_EXPORT _Export
63
# define MRPT_SLAM_IMPORT _Export
64
# endif
65
#elif defined(MRPT_OS_APPLE)
66
# ifdef __MWERKS__
67
# define MRPT_SLAM_EXPORT __declspec(export)
68
# define MRPT_SLAM_IMPORT __declspec(import)
69
# endif
70
#elif defined(__CYGWIN__)
71
# define MRPT_SLAM_EXPORT __declspec(dllexport)
72
# define MRPT_SLAM_IMPORT __declspec(dllimport)
73
#endif
74
75
/* for other platforms/compilers we don't anything */
76
#ifndef MRPT_SLAM_EXPORT
77
# define MRPT_SLAM_EXPORT
78
# define MRPT_SLAM_IMPORT
79
#endif
80
81
/* Macros that map to export declaration when building the DLL, to import
82
declaration if using it or to nothing at all if we are not compiling as DLL */
83
#if defined(MRPT_BUILT_AS_DLL)
84
# if defined(mrpt_slam_EXPORTS)
/* Building the DLL */
85
# define SLAM_IMPEXP MRPT_SLAM_EXPORT
86
# else
/* Using the DLL */
87
# define SLAM_IMPEXP MRPT_SLAM_IMPORT
88
# endif
89
#else
/* not making nor using DLL */
90
# define SLAM_IMPEXP
91
#endif
92
93
94
#endif
boost_join.h
Page generated by
Doxygen 1.8.14
for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019
Hosted on: