41 #ifndef INCLUDED_GLS_VERSION_H
42 #define INCLUDED_GLS_VERSION_H
62 #define GLS_VERSION_MAJOR 8
63 #define GLS_VERSION_MINOR 1
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
98 # elif _MSC_VER < 1940
99 # define GLS_COMPILER_VERSION vc143
101 # pragma message("Warning (gls_version.h): Unrecognized compiler version")
102 # define GLS_COMPILER_VERSION vcXX
112 #define GLS_CRT_VERSION_INT_MD 0x06000000 // MT + DLL
113 #define GLS_CRT_VERSION_INT_MT 0x02000000 // MT
114 #define GLS_CRT_VERSION_INT_ML 0x01000000 // ML
115 #define GLS_CRT_VERSION_INT_MDD 0x0E000000 // DEBUG + MT + DLL
116 #define GLS_CRT_VERSION_INT_MTD 0x0A000000 // DEBUG + MT
117 #define GLS_CRT_VERSION_INT_MLD 0x09000000 // DEBUG + ML
119 #define GLS_CRT_VERSION_INT_MD_64 0x16000000 // MT + DLL
120 #define GLS_CRT_VERSION_INT_MT_64 0x12000000 // MT
121 #define GLS_CRT_VERSION_INT_ML_64 0x11000000 // ML
122 #define GLS_CRT_VERSION_INT_MDD_64 0x1E000000 // DEBUG + MT + DLL
123 #define GLS_CRT_VERSION_INT_MTD_64 0x1A000000 // DEBUG + MT
124 #define GLS_CRT_VERSION_INT_MLD_64 0x19000000 // DEBUG + ML
126 #if !defined(GLS_CRT_VERSION)
131 # define GLS_CRT_VERSION _64mdd
132 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD_64
134 # define GLS_CRT_VERSION mdd
135 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MDD
139 # define GLS_CRT_VERSION _64mtd
140 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD_64
142 # define GLS_CRT_VERSION mtd
143 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MTD
148 # define GLS_CRT_VERSION _64mld
149 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD_64
151 # define GLS_CRT_VERSION mld
152 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MLD
159 # define GLS_CRT_VERSION _64md
160 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD_64
162 # define GLS_CRT_VERSION md
163 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MD
167 # define GLS_CRT_VERSION _64mt
168 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT_64
170 # define GLS_CRT_VERSION mt
171 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_MT
176 # define GLS_CRT_VERSION _64ml
177 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML_64
179 # define GLS_CRT_VERSION ml
180 # define GLS_CRT_VERSION_INT GLS_CRT_VERSION_INT_ML
187 #define GLS_CHECK_VERSION_ID_2( a, b, c, d, e ) GLS_VERSION_##a##_##b##_##c##_##d##_##e // Complete check
188 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3, c1, c2 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3, c1, c2 )
189 #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 )
194 #define GLS_CHECK_VERSION_ID_2( a, b, c ) GLS_VERSION_##a##_##b##_##c##_LIBRARY
195 #define GLS_CHECK_VERSION_ID_1( v1, v2, v3 ) GLS_CHECK_VERSION_ID_2( v1, v2, v3 )
196 #define GLS_CHECK_VERSION_ID GLS_CHECK_VERSION_ID_1( GLS_VERSION_MAJOR, GLS_VERSION_MINOR, GLS_VERSION_BUILD )
201 GLS_EXPORT
void GLS_CHECK_VERSION_ID();
216 int _compilerVersion;
219 int glsMajor = GLS_VERSION_MAJOR,
220 int glsMinor = GLS_VERSION_MINOR,
221 int glsBuild = GLS_VERSION_BUILD,
222 #
if defined(_MSC_VER)
223 int compilerVersion = _MSC_VER + GLS_CRT_VERSION_INT )
224 #elif defined(__GNUC__)
225 int compilerVersion = __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
227 int compilerVersion = 0)
230 _glsMajor = glsMajor;
231 _glsMinor = glsMinor;
232 _glsBuild = glsBuild;
233 _compilerVersion = compilerVersion;
241 inline bool GlsBuiltVersionsMatchExactly(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
243 return a._glsMajor == b._glsMajor &&
244 a._glsMinor == b._glsMinor &&
245 a._glsBuild == b._glsBuild &&
246 a._compilerVersion == b._compilerVersion;
251 inline bool GlsBuiltVersionsAreBinaryCompatible(
const GlsBuiltVersionInfo& a,
const GlsBuiltVersionInfo& b)
253 bool compiler_compatible = (a._compilerVersion == b._compilerVersion);
255 #if defined(__GNUC__)
257 if (!compiler_compatible)
259 if (a._compilerVersion >= 30400 && b._compilerVersion >= 30400 )
263 compiler_compatible =
true;
270 return (compiler_compatible &&
271 a._glsMajor == b._glsMajor &&
272 a._glsMinor == b._glsMinor &&
273 a._glsBuild/1000 == b._glsBuild/1000 );
A file for all GL Studio files to include.
Definition: gls_version.h:210
Definition: bmpimage.h:46