1 ////////////////////////////////////////////////////////////////////////////////
3 // Copyright (c) 2006 by Peter Kümmel
4 // Permission to use, copy, modify, distribute and sell this software for any
5 // purpose is hereby granted without fee, provided that the above copyright
6 // notice appear in all copies and that both that copyright notice and this
7 // permission notice appear in supporting documentation.
8 // The author makes no representations about the
9 // suitability of this software for any purpose. It is provided "as is"
10 // without express or implied warranty.
11 ////////////////////////////////////////////////////////////////////////////////
12 #ifndef LOKI_LOKIEXPORT_INC_
13 #define LOKI_LOKIEXPORT_INC_
15 // $Id: LokiExport.h 748 2006-10-17 19:49:08Z syntheticpp $
20 #ifdef _HAVE_GCC_VISIBILITY
21 #define LOKI_EXPORT_SPEC __attribute__ ((visibility("default")))
22 #define LOKI_IMPORT_SPEC
24 #define LOKI_EXPORT_SPEC
25 #define LOKI_IMPORT_SPEC
31 #define LOKI_EXPORT_SPEC __declspec(dllexport)
32 #define LOKI_IMPORT_SPEC __declspec(dllimport)
34 #define LOKI_EXPORT_SPEC
35 #define LOKI_IMPORT_SPEC
41 #if (defined(LOKI_MAKE_DLL) && defined(LOKI_DLL)) || \
42 (defined(LOKI_MAKE_DLL) && defined(LOKI_STATIC)) || \
43 (defined(LOKI_DLL) && defined(LOKI_STATIC))
44 #error export macro error: you could not build AND use the library
48 #define LOKI_EXPORT LOKI_EXPORT_SPEC
52 #define LOKI_EXPORT LOKI_IMPORT_SPEC
59 #if !defined(LOKI_EXPORT) && !defined(EXPLICIT_EXPORT)
64 #error export macro error: LOKI_EXPORT was not defined, disable EXPLICIT_EXPORT or define a export specification
68 #endif // end file guardian