41 #ifndef INCLUDED_GLS_VERSION_H
42 #define INCLUDED_GLS_VERSION_H
62 #define GLS_VERSION_MAJOR 7
63 #define GLS_VERSION_MINOR 2
64 #define GLS_VERSION_BUILD 0000
66 #define GLS_STRINGIZE(x) #x
67 #define GLS_STRINGIZE_VALUE(x) GLS_STRINGIZE(x)
70 #define GLS_VERSION_1(a,b) GLS_STRINGIZE(a.b)
71 #define GLS_VERSION GLS_VERSION_1(GLS_VERSION_MAJOR, GLS_VERSION_MINOR)
73 #define GLS_LICENSE_VERSION GLS_VERSION_1(GLS_VERSION_MAJOR, 0)
76 #define GLS_BUILD_VERSION GLS_STRINGIZE_VALUE(GLS_VERSION_BUILD)
80 #if !defined(GLS_COMPILER_VERSION)
82 # pragma message("Warning (gls_version.h): Unrecognized compiler version")
83 # define GLS_COMPILER_VERSION vcXX
86 # pragma message("Warning (gls_version.h): Unrecognized compiler version")
87 # define GLS_COMPILER_VERSION vcXX
88 # elif _MSC_VER < 1800
89 # define GLS_COMPILER_VERSION vc110
90 # elif _MSC_VER < 1900
91 # define GLS_COMPILER_VERSION vc120
92 # elif _MSC_VER < 1910
93 # define GLS_COMPILER_VERSION vc140
94 # elif _MSC_VER < 1920
95 # define GLS_COMPILER_VERSION vc141
96 # elif _MSC_VER < 1930
97 # define GLS_COMPILER_VERSION vc142
99 # pragma message("Warning (gls_version.h): Unrecognized compiler version")
100 # define GLS_COMPILER_VERSION vcXX
110 #define GLS_CRT_VERSION_INT_MD 0x06000000 // MT + DLL
111 #define GLS_CRT_VERSION_INT_MT 0x02000000 // MT
112 #define GLS_CRT_VERSION_INT_ML 0x01000000 // ML
113 #define GLS_CRT_VERSION_INT_MDD 0x0E000000 // DEBUG + MT + DLL
114 #define GLS_CRT_VERSION_INT_MTD 0x0A000000 // DEBUG + MT
115 #define GLS_CRT_VERSION_INT_MLD 0x09000000 // DEBUG + ML
117 #define GLS_CRT_VERSION_INT_MD_64 0x16000000 // MT + DLL
118 #define GLS_CRT_VERSION_INT_MT_64 0x12000000 // MT
119 #define GLS_CRT_VERSION_INT_ML_64 0x11000000 // ML
120 #define GLS_CRT_VERSION_INT_MDD_64 0x1E000000 // DEBUG + MT + DLL
121 #define GLS_CRT_VERSION_INT_MTD_64 0x1A000000 // DEBUG + MT
122 #define GLS_CRT_VERSION_INT_MLD_64 0x19000000 // DEBUG + ML
124 #if !defined(GLS_CRT_VERSION)
129 # define GLS_CRT_VERSION _64mdd
130 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD_64
132 # define GLS_CRT_VERSION mdd
133 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD
137 # define GLS_CRT_VERSION _64mtd
138 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD_64
140 # define GLS_CRT_VERSION mtd
141 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD
146 # define GLS_CRT_VERSION _64mld
147 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD_64
149 # define GLS_CRT_VERSION mld
150 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD
157 # define GLS_CRT_VERSION _64md
158 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD_64
160 # define GLS_CRT_VERSION md
161 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD
165 # define GLS_CRT_VERSION _64mt
166 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT_64
168 # define GLS_CRT_VERSION mt
169 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT
174 # define GLS_CRT_VERSION _64ml
175 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML_64
177 # define GLS_CRT_VERSION ml
178 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML
185 #define GLS_CHECK_VERSION_ID_2( a, b, c, d, e ) GLS_VERSION_##a##_##b##_##c##_##d##_##e // Complete check
186 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3, c1, c2 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3, c1, c2 )
187 #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 )
192 #define GLS_CHECK_VERSION_ID_2( a, b, c ) GLS_VERSION_##a##_##b##_##c##_LIBRARY
193 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3 )
194 #define GLS_CHECK_VERSION_ID GLS_CHECK_VERSION_ID_1( GLS_VERSION_MAJOR, GLS_VERSION_MINOR, GLS_VERSION_BUILD )
199 GLS_EXPORT
void GLS_CHECK_VERSION_ID();
214 int _compilerVersion;
217 int glsMajor = GLS_VERSION_MAJOR,
218 int glsMinor = GLS_VERSION_MINOR,
219 int glsBuild = GLS_VERSION_BUILD,
220 #
if defined(_MSC_VER)
221 int compilerVersion = _MSC_VER + GLS_CRT_VERSION_INT )
222 #elif defined(__GNUC__)
223 int compilerVersion = __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
225 int compilerVersion = 0)
228 _glsMajor = glsMajor;
229 _glsMinor = glsMinor;
230 _glsBuild = glsBuild;
231 _compilerVersion = compilerVersion;
239 inline bool GlsBuiltVersionsMatchExactly(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
241 return a._glsMajor == b._glsMajor &&
242 a._glsMinor == b._glsMinor &&
243 a._glsBuild == b._glsBuild &&
244 a._compilerVersion == b._compilerVersion;
249 inline bool GlsBuiltVersionsAreBinaryCompatible(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
251 bool compiler_compatible = (a._compilerVersion == b._compilerVersion);
253 #if defined(__GNUC__)
255 if (!compiler_compatible)
257 if (a._compilerVersion >= 30400 && b._compilerVersion >= 30400 )
261 compiler_compatible =
true;
268 return (compiler_compatible &&
269 a._glsMajor == b._glsMajor &&
270 a._glsMinor == b._glsMinor &&
271 a._glsBuild/1000 == b._glsBuild/1000 );
A file for all GL Studio files to include.
Definition: gls_version.h:208
Definition: bmpimage.h:46