Main MRPT website
>
C++ reference for MRPT 1.5.7
mrpt
base
base/include/mrpt/base/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-2017, 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
#pragma once
11
12
#include <mrpt/config.h>
13
14
// ** Important! **
15
// In each mrpt library, search and replace:
16
// MRPT_XXX_EXPORT, MRPT_XXX_IMPORT
17
// BASE_IMPEXP, mrpt_xxx_EXPORTS
18
19
/* The macros below for DLL import/export are required for Windows only.
20
Mostly all the definitions in this file are copied or at least based
21
on the file wx/dlimpexp.h, written by Vadim Zeitlin and published
22
under the wxWindows licence.
23
*/
24
#if defined(MRPT_OS_WINDOWS)
25
#define MRPT_BASE_EXPORT __declspec(dllexport)
26
#define MRPT_BASE_IMPORT __declspec(dllimport)
27
#else
28
# define MRPT_BASE_EXPORT
29
# define MRPT_BASE_IMPORT
30
#endif
31
32
/* Macros that map to export declaration when building the DLL, to import
33
declaration if using it or to nothing at all if we are not compiling as DLL */
34
#if defined(MRPT_BUILT_AS_DLL)
35
# if defined(mrpt_base_EXPORTS)
/* Building the DLL */
36
# define BASE_IMPEXP MRPT_BASE_EXPORT
37
# else
/* Using the DLL */
38
# define BASE_IMPEXP MRPT_BASE_IMPORT
39
# endif
40
#else
/* not making nor using DLL */
41
# define BASE_IMPEXP
42
#endif
43
44
// Finally this one allows exporting a class that inherits from a
45
// template in MS DLLs with both MSVC and GCC. To see how nasty is
46
// this, Google "class derived from template DLL export" and suffer...
47
#if defined(_MSC_VER)
48
# define BASE_IMPEXP_TEMPL
49
#else
50
// Mostly for Mingw:
51
# define BASE_IMPEXP_TEMPL BASE_IMPEXP
52
#endif
Page generated by
Doxygen 1.8.14
for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019