41 #ifndef INCLUDED_GLS_VERSION_H
42 #define INCLUDED_GLS_VERSION_H
62 #define GLS_VERSION_MAJOR 6
63 #define GLS_VERSION_MINOR 3
64 #define GLS_VERSION_BUILD 1000
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 < 2000
95 # define GLS_COMPILER_VERSION vc141
97 # pragma message("Warning (gls_version.h): Unrecognized compiler version")
98 # define GLS_COMPILER_VERSION vcXX
108 #define GLS_CRT_VERSION_INT_MD 0x06000000 // MT + DLL
109 #define GLS_CRT_VERSION_INT_MT 0x02000000 // MT
110 #define GLS_CRT_VERSION_INT_ML 0x01000000 // ML
111 #define GLS_CRT_VERSION_INT_MDD 0x0E000000 // DEBUG + MT + DLL
112 #define GLS_CRT_VERSION_INT_MTD 0x0A000000 // DEBUG + MT
113 #define GLS_CRT_VERSION_INT_MLD 0x09000000 // DEBUG + ML
115 #define GLS_CRT_VERSION_INT_MD_64 0x16000000 // MT + DLL
116 #define GLS_CRT_VERSION_INT_MT_64 0x12000000 // MT
117 #define GLS_CRT_VERSION_INT_ML_64 0x11000000 // ML
118 #define GLS_CRT_VERSION_INT_MDD_64 0x1E000000 // DEBUG + MT + DLL
119 #define GLS_CRT_VERSION_INT_MTD_64 0x1A000000 // DEBUG + MT
120 #define GLS_CRT_VERSION_INT_MLD_64 0x19000000 // DEBUG + ML
122 #if !defined(GLS_CRT_VERSION)
127 # define GLS_CRT_VERSION _64mdd
128 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD_64
130 # define GLS_CRT_VERSION mdd
131 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD
135 # define GLS_CRT_VERSION _64mtd
136 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD_64
138 # define GLS_CRT_VERSION mtd
139 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD
144 # define GLS_CRT_VERSION _64mld
145 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD_64
147 # define GLS_CRT_VERSION mld
148 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD
155 # define GLS_CRT_VERSION _64md
156 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD_64
158 # define GLS_CRT_VERSION md
159 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD
163 # define GLS_CRT_VERSION _64mt
164 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT_64
166 # define GLS_CRT_VERSION mt
167 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT
172 # define GLS_CRT_VERSION _64ml
173 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML_64
175 # define GLS_CRT_VERSION ml
176 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML
183 #define GLS_CHECK_VERSION_ID_2( a, b, c, d, e ) GLS_VERSION_##a##_##b##_##c##_##d##_##e // Complete check
184 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3, c1, c2 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3, c1, c2 )
185 #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 )
190 #define GLS_CHECK_VERSION_ID_2( a, b, c ) GLS_VERSION_##a##_##b##_##c##_LIBRARY
191 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3 )
192 #define GLS_CHECK_VERSION_ID GLS_CHECK_VERSION_ID_1( GLS_VERSION_MAJOR, GLS_VERSION_MINOR, GLS_VERSION_BUILD )
197 GLS_EXPORT
void GLS_CHECK_VERSION_ID();
212 int _compilerVersion;
215 int glsMajor = GLS_VERSION_MAJOR,
216 int glsMinor = GLS_VERSION_MINOR,
217 int glsBuild = GLS_VERSION_BUILD,
218 #
if defined(_MSC_VER)
219 int compilerVersion = _MSC_VER + GLS_CRT_VERSION_INT )
220 #elif defined(__GNUC__)
221 int compilerVersion = __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
223 int compilerVersion = 0)
226 _glsMajor = glsMajor;
227 _glsMinor = glsMinor;
228 _glsBuild = glsBuild;
229 _compilerVersion = compilerVersion;
237 inline bool GlsBuiltVersionsMatchExactly(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
239 return a._glsMajor == b._glsMajor &&
240 a._glsMinor == b._glsMinor &&
241 a._glsBuild == b._glsBuild &&
242 a._compilerVersion == b._compilerVersion;
247 inline bool GlsBuiltVersionsAreBinaryCompatible(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
249 bool compiler_compatible = (a._compilerVersion == b._compilerVersion);
251 #if defined(__GNUC__)
253 if (!compiler_compatible)
255 if (a._compilerVersion >= 30400 && b._compilerVersion >= 30400 )
259 compiler_compatible =
true;
266 return (compiler_compatible &&
267 a._glsMajor == b._glsMajor &&
268 a._glsMinor == b._glsMinor &&
269 a._glsBuild/1000 == b._glsBuild/1000 );
A file for all GL Studio files to include.
Definition: gls_version.h:206
Definition: bmpimage.h:46