Mudbox/dllinterface.h Source File

dllinterface.h
Go to the documentation of this file.
1 
2 //**************************************************************************/
3 // Copyright (c) 2008 Autodesk, Inc.
4 // All rights reserved.
5 //
6 // Use of this software is subject to the terms of the Autodesk license
7 // agreement provided at the time of installation or download, or which
8 // otherwise accompanies this software in either electronic or hard copy form.
9 //
10 //**************************************************************************/
11 // DESCRIPTION:
12 // CREATED: October 2008
13 //**************************************************************************/
14 
15 #ifndef __MUDBOX_DLLINTERFACE_H__
16 #define __MUDBOX_DLLINTERFACE_H__
17 
18 #if defined(WIN32) || defined(WIN64)
19 #define MUDBOX_DLLEXPORT __declspec(dllexport)
20 #define MUDBOX_DLLIMPORT __declspec(dllimport)
21 #define MUDBOX_DLLINTERNAL
22 #elif defined(__GNUC__)
23 #define MUDBOX_DLLEXPORT __attribute__ ((visibility("default")))
24 #define MUDBOX_DLLIMPORT __attribute__ ((visibility("default")))
25 #define MUDBOX_DLLINTERNAL __attribute__ ((visibility("hidden")))
26 #else
27 #define MUDBOX_DLLEXPORT
28 #define MUDBOX_DLLIMPORT
29 #define MUDBOX_DLLINTERNAL
30 #endif
31 
32 #if defined(COMPILING_MUDBOX_DLL)
33 #define MBDLL_DECL MUDBOX_DLLEXPORT
34 #else
35 #define MBDLL_DECL MUDBOX_DLLIMPORT
36 #endif
37 
38 // On Windows, Template Declaration requires no special argument to be passed
39 // On Unixes, however, we need to declare them as exported because, internally,
40 // it is using the typeinfo pointers instead of class names to perform dynamic_cast.
41 #if defined(WIN32)
42 #define MBDLL_TEMPLATE_DECL
43 #else
44 #define MBDLL_TEMPLATE_DECL MBDLL_DECL
45 #endif
46 
47 #endif