1
// ----------------------------------------------------------------------------
2
// Making or using sword as a Windows DLL
3
// ----------------------------------------------------------------------------
7
#ifdef NO_SWORD_NAMESPACE
8
#define SWORD_NAMESPACE_START namespace sword {
9
#define SWORD_NAMESPACE_END }; using namespace sword;
11
#define SWORD_NAMESPACE_START namespace sword {
12
#define SWORD_NAMESPACE_END }
18
// _declspec works in BC++ 5 and later, as well as VC++
22
# define SWDLLEXPORT _declspec( dllexport )
23
# define SWDLLEXPORT_DATA(type) _declspec( dllexport ) type
24
# define SWDLLEXPORT_CTORFN
25
# elif defined(SWUSINGDLL)
26
# define SWDLLEXPORT _declspec( dllimport )
27
# define SWDLLEXPORT_DATA(type) _declspec( dllimport ) type
28
# define SWDLLEXPORT_CTORFN
31
# define SWDLLEXPORT_DATA(type) type
32
# define SWDLLEXPORT_CTORFN
35
#elif defined(__SWPM__)
38
# define SWDLLEXPORT _Export
39
# define SWDLLEXPORT_DATA(type) _Export type
40
# define SWDLLEXPORT_CTORFN
41
# elif defined(SWUSINGDLL)
42
# define SWDLLEXPORT _Export
43
# define SWDLLEXPORT_DATA(type) _Export type
44
# define SWDLLEXPORT_CTORFN
47
# define SWDLLEXPORT_DATA(type) type
48
# define SWDLLEXPORT_CTORFN
51
#elif defined(__GNUWIN32__)
54
# define SWDLLEXPORT __declspec( dllexport )
55
# define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
56
# define SWDLLEXPORT_CTORFN
57
# elif defined(SWUSINGDLL)
58
# define SWDLLEXPORT __declspec( dllimport )
59
# define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
60
# define SWDLLEXPORT_CTORFN
63
# define SWDLLEXPORT_DATA(type) type
64
# define SWDLLEXPORT_CTORFN
67
#elif defined(__BORLANDC__)
69
# define SWDLLEXPORT _export
70
# define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
71
# define SWDLLEXPORT_CTORFN
72
# elif defined(SWUSINGDLL)
73
# define SWDLLEXPORT __declspec( dllimport )
74
# define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
75
# define SWDLLEXPORT_CTORFN
78
# define SWDLLEXPORT_DATA(type) type
79
# define SWDLLEXPORT_CTORFN
84
# define SWDLLEXPORT_DATA(type) type
85
# define SWDLLEXPORT_CTORFN
88
// For ostream, istream ofstream
89
#if defined(__BORLANDC__) && defined( _RTLDLL )
90
# define SWDLLIMPORT __import