strusBase  0.17
dll_tags.hpp
Go to the documentation of this file.
1 #ifndef _STRUS_DLL_SYMBOL_TAGS_HPP_INCLUDED
2 #define _STRUS_DLL_SYMBOL_TAGS_HPP_INCLUDED
3 
4 #if defined _WIN32 || defined __CYGWIN__
5  #ifdef BUILDING_DLL
6  #ifdef __GNUC__
7  #define DLL_PUBLIC __attribute__ ((dllexport))
8  #else
9  #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
10  #endif
11  #else
12  #ifdef __GNUC__
13  #define DLL_PUBLIC __attribute__ ((dllimport))
14  #else
15  #define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
16  #endif
17  #endif
18  #define DLL_LOCAL
19 #else
20  #if __GNUC__ >= 4
21  #define DLL_PUBLIC __attribute__ ((visibility ("default")))
22  #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
23  #else
24  #define DLL_PUBLIC
25  #define DLL_LOCAL
26  #endif
27 #endif
28 
29 #endif
30