DLLSupport.h
Go to the documentation of this file.
1 /*!
2  *
3  *
4  * \brief Defines SHARK_COMPILE_DLL
5  *
6  * Windows requires the explicit export of symbols inside a DLL otherwise DLL symbols are not available.
7  * SHARK_COMPILE_DLL is a macro that expands to nothing if SHARK_USE_DYNLIB is not defined or the compiler is not MSVC.
8  * This is the case on linux systems or if no DLL is build. Otherwise, it expands to __declspec(dllexport) or __declspec(dllimport)
9  * based on whether SHARK_COMPILE_DLL is defined.
10  *
11  * \author Oswin Krause
12  * \date 2015
13  *
14  *
15  * \par Copyright 1995-2017 Shark Development Team
16  *
17  * <BR><HR>
18  * This file is part of Shark.
19  * <http://shark-ml.org/>
20  *
21  * Shark is free software: you can redistribute it and/or modify
22  * it under the terms of the GNU Lesser General Public License as published
23  * by the Free Software Foundation, either version 3 of the License, or
24  * (at your option) any later version.
25  *
26  * Shark is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU Lesser General Public License for more details.
30  *
31  * You should have received a copy of the GNU Lesser General Public License
32  * along with Shark. If not, see <http://www.gnu.org/licenses/>.
33  *
34  */
35 #ifndef SHARK_CORE_DLLSUPPORT_H
36 #define SHARK_CORE_DLLSUPPORT_H
37 
38 #include <boost/config.hpp>
39 #include <shark/Core/Shark.h>
40 
41 #if !( defined SHARK_USE_DYNLIB && defined BOOST_MSVC)
42 #define SHARK_EXPORT_SYMBOL
43 #elif !(defined SHARK_COMPILE_DLL)
44 #define SHARK_EXPORT_SYMBOL __declspec(dllimport)
45 #else
46 #define SHARK_EXPORT_SYMBOL __declspec(dllexport)
47 #endif
48 
49 #endif