41 #ifndef INCLUDED_GLS_VERSION_H
42 #define INCLUDED_GLS_VERSION_H
62 #define GLS_VERSION_MAJOR 6
63 #define GLS_VERSION_MINOR 2
64 #define GLS_VERSION_BUILD 3001
65 #define GLS_BUILD_DATE "2018-04-25"
69 #define GLS_LICENSE_VERSION "5.0"
70 #define GLS_LICENSE_VERSION_INT 50
74 #define GLS_STRINGIZE(x) #x
75 #define GLS_STRINGIZE_VALUE(x) GLS_STRINGIZE(x)
78 #define GLS_VERSION_1(a,b) GLS_STRINGIZE(a.b)
79 #define GLS_VERSION GLS_VERSION_1(GLS_VERSION_MAJOR, GLS_VERSION_MINOR)
82 #define GLS_BUILD_VERSION GLS_STRINGIZE_VALUE(GLS_VERSION_BUILD)
86 #if !defined(GLS_COMPILER_VERSION)
88 # pragma message("Warning (version.h): Unrecognized compiler version")
89 # define GLS_COMPILER_VERSION vcXX
92 # pragma message("Warning (version.h): Unrecognized compiler version")
93 # define GLS_COMPILER_VERSION vcXX
94 # elif _MSC_VER < 1800
95 # define GLS_COMPILER_VERSION vc110
96 # elif _MSC_VER < 1900
97 # define GLS_COMPILER_VERSION vc120
98 # elif _MSC_VER < 1910
99 # define GLS_COMPILER_VERSION vc140
100 # elif _MSC_VER < 2000
101 # define GLS_COMPILER_VERSION vc141
103 # pragma message("Warning (version.h): Unrecognized compiler version")
104 # define GLS_COMPILER_VERSION vcXX
114 #define GLS_CRT_VERSION_INT_MD 0x06000000 // MT + DLL
115 #define GLS_CRT_VERSION_INT_MT 0x02000000 // MT
116 #define GLS_CRT_VERSION_INT_ML 0x01000000 // ML
117 #define GLS_CRT_VERSION_INT_MDD 0x0E000000 // DEBUG + MT + DLL
118 #define GLS_CRT_VERSION_INT_MTD 0x0A000000 // DEBUG + MT
119 #define GLS_CRT_VERSION_INT_MLD 0x09000000 // DEBUG + ML
121 #define GLS_CRT_VERSION_INT_MD_64 0x16000000 // MT + DLL
122 #define GLS_CRT_VERSION_INT_MT_64 0x12000000 // MT
123 #define GLS_CRT_VERSION_INT_ML_64 0x11000000 // ML
124 #define GLS_CRT_VERSION_INT_MDD_64 0x1E000000 // DEBUG + MT + DLL
125 #define GLS_CRT_VERSION_INT_MTD_64 0x1A000000 // DEBUG + MT
126 #define GLS_CRT_VERSION_INT_MLD_64 0x19000000 // DEBUG + ML
128 #if !defined(GLS_CRT_VERSION)
133 # define GLS_CRT_VERSION _64mdd
134 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD_64
136 # define GLS_CRT_VERSION mdd
137 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD
141 # define GLS_CRT_VERSION _64mtd
142 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD_64
144 # define GLS_CRT_VERSION mtd
145 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD
150 # define GLS_CRT_VERSION _64mld
151 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD_64
153 # define GLS_CRT_VERSION mld
154 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD
161 # define GLS_CRT_VERSION _64md
162 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD_64
164 # define GLS_CRT_VERSION md
165 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD
169 # define GLS_CRT_VERSION _64mt
170 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT_64
172 # define GLS_CRT_VERSION mt
173 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT
178 # define GLS_CRT_VERSION _64ml
179 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML_64
181 # define GLS_CRT_VERSION ml
182 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML
189 #define GLS_CHECK_VERSION_ID_2( a, b, c, d, e ) GLS_VERSION_##a##_##b##_##c##_##d##_##e // Complete check
190 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3, c1, c2 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3, c1, c2 )
191 #define GLS_CHECK_VERSION_ID GLS_CHECK_VERSION_ID_1( GLS_VERSION_MAJOR, GLS_VERSION_MINOR, GLS_VERSION_BUILD, GLS_COMPILER_VERSION, GLS_CRT_VERSION )
196 #define GLS_CHECK_VERSION_ID_2( a, b, c ) GLS_VERSION_##a##_##b##_##c##_LIBRARY
197 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3 )
198 #define GLS_CHECK_VERSION_ID GLS_CHECK_VERSION_ID_1( GLS_VERSION_MAJOR, GLS_VERSION_MINOR, GLS_VERSION_BUILD )
203 GLS_EXPORT
void GLS_CHECK_VERSION_ID();
218 int _compilerVersion;
221 int glsMajor = GLS_VERSION_MAJOR,
222 int glsMinor = GLS_VERSION_MINOR,
223 int glsBuild = GLS_VERSION_BUILD,
224 #
if defined(_MSC_VER)
225 int compilerVersion = _MSC_VER + GLS_CRT_VERSION_INT )
226 #elif defined(__GNUC__)
227 int compilerVersion = __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
229 int compilerVersion = 0)
232 _glsMajor = glsMajor;
233 _glsMinor = glsMinor;
234 _glsBuild = glsBuild;
235 _compilerVersion = compilerVersion;
243 inline bool GlsBuiltVersionsMatchExactly(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
245 return a._glsMajor == b._glsMajor &&
246 a._glsMinor == b._glsMinor &&
247 a._glsBuild == b._glsBuild &&
248 a._compilerVersion == b._compilerVersion;
253 inline bool GlsBuiltVersionsAreBinaryCompatible(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
255 bool compiler_compatible = (a._compilerVersion == b._compilerVersion);
257 #if defined(__GNUC__)
259 if (!compiler_compatible)
261 if (a._compilerVersion >= 30400 && a._compilerVersion < 30500 &&
262 b._compilerVersion >= 30400 && b._compilerVersion < 30500)
266 compiler_compatible =
true;
268 else if (a._compilerVersion >= 40000 && a._compilerVersion < 40200 &&
269 b._compilerVersion >= 40000 && b._compilerVersion < 40200)
272 compiler_compatible =
true;
274 else if (a._compilerVersion >= 40200 && a._compilerVersion < 40400 &&
275 b._compilerVersion >= 40200 && b._compilerVersion < 40400)
278 compiler_compatible =
true;
280 else if (a._compilerVersion >= 40400 && a._compilerVersion < 40600 &&
281 b._compilerVersion >= 40400 && b._compilerVersion < 40600)
284 compiler_compatible =
true;
286 else if (a._compilerVersion >= 40600 && a._compilerVersion < 40800 &&
287 b._compilerVersion >= 40600 && b._compilerVersion < 40800)
290 compiler_compatible =
true;
292 else if (a._compilerVersion >= 40800 && a._compilerVersion < 50000 &&
293 b._compilerVersion >= 40800 && b._compilerVersion < 50000)
296 compiler_compatible =
true;
298 else if (a._compilerVersion >= 50000 && a._compilerVersion < 60000 &&
299 b._compilerVersion >= 50000 && b._compilerVersion < 60000)
302 compiler_compatible =
true;
304 else if (a._compilerVersion >= 60000 && a._compilerVersion < 70000 &&
305 b._compilerVersion >= 60000 && b._compilerVersion < 70000)
308 compiler_compatible =
true;
314 return (compiler_compatible &&
315 a._glsMajor == b._glsMajor &&
316 a._glsMinor == b._glsMinor &&
317 a._glsBuild/1000 == b._glsBuild/1000 );
A file for all GL Studio files to include.
Definition: version.h:212
Definition: bmpimage.h:46