OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owllink.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// Object Windows Library
3// Copyright (c) 1998 by Yura Bidus, All Rights Reserved
4// Copyright (c) 2008-2013 Vidar Hasfjord
5//----------------------------------------------------------------------------
6
7#if !defined(OWL_PRIVATE_OWLLINK_H)
8#define OWL_PRIVATE_OWLLINK_H
9
10#include <owl/version.h>
11
12#define OWL_LIB_NAME "owl"
13
14#define OWL_LIB_DELIMITER "-"
15
16#define OWL_LIB_VERSION OWL_PRODUCTVERSION_STRING
17
18#if defined(__BORLANDC__) && defined(__clang__)
19
20#define OWL_LIB_COMPILER "c"
21
22#if __BORLANDC__ >= 0x790
23#error OWLNext: Unsupported compiler version (too new; please add support).
24#elif __BORLANDC__ >= 0x780 // RAD Studio/C++Builder 13 Florence (RX/CX)
25#define OWL_LIB_COMPILER_VERSION "780"
26#elif __BORLANDC__ >= 0x770 // RAD Studio/C++Builder 12 Athens (RX/CX)
27#define OWL_LIB_COMPILER_VERSION "770"
28#elif __BORLANDC__ >= 0x760 // RAD Studio/C++Builder 11 Alexandria (RX/CX)
29#define OWL_LIB_COMPILER_VERSION "760"
30#elif __BORLANDC__ >= 0x750 // RAD Studio/C++Builder 10.4 Sydney (RX/CX)
31#define OWL_LIB_COMPILER_VERSION "750"
32#elif __BORLANDC__ >= 0x740 // RAD Studio/C++Builder 10.3 Rio (RX/CX)
33#define OWL_LIB_COMPILER_VERSION "740"
34#elif (__BORLANDC__ >= 0x730) // RAD Studio/C++Builder 10.2 Tokyo (RX/CX)
35#define OWL_LIB_COMPILER_VERSION "730"
36#else
37#error OWLNext: Unsupported compiler version (too old; update to a newer version).
38#endif
39
40#if !defined(__MT__)
41#error OWLNext: Single-thread build not supported for C++ Builder Clang compiler
42#endif
43
44#elif defined(_MSC_VER)
45
46#define OWL_LIB_COMPILER "v"
47
48#if _MSC_VER >= 1960
49#error OWLNext: Unsupported compiler version (too new; please add support).
50#elif _MSC_VER >= 1950 // VS 2026 (_MSC_VER: 1950)
51#define OWL_LIB_COMPILER_VERSION "145" // Platform toolset "v145"
52#elif _MSC_VER >= 1930 // VS 2022 (_MSC_VER: 1930-1949)
53#define OWL_LIB_COMPILER_VERSION "1930" // Platform toolset "v143" (14.30-14.49)
54#elif _MSC_VER >= 1920 // VS 2019
55#define OWL_LIB_COMPILER_VERSION "1920"
56#elif _MSC_VER >= 1910 // VS 2017
57#define OWL_LIB_COMPILER_VERSION "1910"
58#else
59#error OWLNext: Unsupported compiler version (too old; update to a newer version).
60#endif
61
62#if !defined(_MT)
63#error OWLNext: Single-thread build not supported for Microsoft Visual C++ compiler
64#endif
65
66#else
67
68#error OWLNext: Unsupported compiler.
69
70#endif
71
72// Platform processor architecture (ISA)
73
74#if defined(_M_AMD64)
75#define OWL_LIB_PLATFORM "x64"
76#elif defined(_M_IX86)
77#define OWL_LIB_PLATFORM "x86"
78#else
79#error OWLNext: Unsupported platform.
80#endif
81
82// Compatibility modes
83
84#if defined(OWL5_COMPAT)
85#define OWL_LIB_COMPAT "5"
86#else
87#define OWL_LIB_COMPAT ""
88#endif
89
90// Debugging modes
91
92#if defined(__CODEGUARD__)
93#define OWL_LIB_DEBUG "g"
94#elif defined(__DEBUG) && (__DEBUG > 0)
95#define OWL_LIB_DEBUG "d"
96#else
97#define OWL_LIB_DEBUG ""
98#endif
99
100// Threading (concurrency) modes
101
102#if defined(INC_VCL)
103#define OWL_LIB_THREADING "v"
104#elif defined(__MT__) || defined(_MT)
105#define OWL_LIB_THREADING "t"
106#else
107#define OWL_LIB_THREADING "s"
108#endif
109
110// Character type modes
111
112#if defined(UNICODE)
113#define OWL_LIB_CHARACTERTYPE "u"
114#else
115#define OWL_LIB_CHARACTERTYPE ""
116#endif
117
118// Link (import) modes
119
120#if defined(_OWLDLL)
121#define OWL_LIB_IMPORT "i"
122#else
123#define OWL_LIB_IMPORT ""
124#endif
125
126// Compose the appropriate pragma link directive.
127
128#pragma comment(lib, \
129 OWL_LIB_NAME \
130 OWL_LIB_DELIMITER \
131 OWL_LIB_VERSION \
132 OWL_LIB_DELIMITER \
133 OWL_LIB_COMPILER \
134 OWL_LIB_COMPILER_VERSION \
135 OWL_LIB_DELIMITER \
136 OWL_LIB_PLATFORM \
137 OWL_LIB_DELIMITER \
138 OWL_LIB_COMPAT \
139 OWL_LIB_DEBUG \
140 OWL_LIB_THREADING \
141 OWL_LIB_CHARACTERTYPE \
142 OWL_LIB_IMPORT \
143 ".lib")
144
145#endif // OWL_PRIVATE_OWLLINK_H
Library version and build information header (template).