| GL Studio C++ Runtime API

gls_auto_lib.h
Go to the documentation of this file.
1/*! \file
2 \brief The gls_auto_lib.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38
39*/
40#if defined( WIN32 )
41
42// Determine compiler version
43# if !defined( GLS_LIB_SUFFIX )
44# if _MSC_VER < 1900
45# pragma message( "Warning (gls_version.h): Unrecognized compiler version" )
46# define GLS_COMPILER_VERSION vcXX
47# elif _MSC_VER < 1910
48# ifdef _WIN64
49# define GLS_LIB_SUFFIX "_vc140_64"
50# else
51# define GLS_LIB_SUFFIX "_vc140"
52# endif
53# elif _MSC_VER < 1920
54# ifdef _WIN64
55# define GLS_LIB_SUFFIX "_vc141_64"
56# else
57# define GLS_LIB_SUFFIX "_vc141"
58# endif
59# elif _MSC_VER < 1930
60# ifdef _WIN64
61# define GLS_LIB_SUFFIX "_vc142_64"
62# else
63# define GLS_LIB_SUFFIX "_vc142"
64# endif
65# elif _MSC_VER < 1950
66# ifdef _WIN64
67# define GLS_LIB_SUFFIX "_vc143_64"
68# else
69# define GLS_LIB_SUFFIX "_vc143"
70# endif
71# else
72# error "Unsupported Compiler detected."
73# define GLS_LIB_SUFFIX "_vcXX"
74# endif
75# endif
76
77// Determine C runtime version
78# if !defined( GLS_LIB_CRT_SUFFIX )
79# if defined( _DEBUG )
80# if defined( _MT )
81# if defined( _DLL )
82# define GLS_LIB_CRT_SUFFIX "mdd"
83# else
84# define GLS_LIB_CRT_SUFFIX "mtd"
85# endif
86# else
87# define GLS_LIB_CRT_SUFFIX "mld"
88# endif
89# else
90# if defined( _MT )
91# if defined( _DLL )
92# define GLS_LIB_CRT_SUFFIX "md"
93# else
94# define GLS_LIB_CRT_SUFFIX "mt"
95# endif
96# else
97# define GLS_LIB_CRT_SUFFIX "ml"
98# endif
99# endif
100# endif
101
102// Determine import library type
103# if !defined( GLS_LIB_TYPE )
104# if defined( GLS_IMPORT_LIBRARY ) // glstudio runtime DLL
105# define GLS_LIB_TYPE "_glsdll"
106# else // statically linked glstudio runtime library
107# define GLS_LIB_TYPE ""
108# endif
109# endif
110
111// Internal disti libraries
112# if !defined( GLS_AUTOLIB_SUFFIX )
113# if defined( GLS_AUTOLIB_DEBUG )
114# define GLS_AUTOLIB_SUFFIX "d"
115# else
116# define GLS_AUTOLIB_SUFFIX
117# endif
118# endif
119
120// Automatic library inclusion macros that use the #pragma/lib feature
121# if !defined( NO_GLS_AUTOLIB )
122# define GLS_BUILD_LIB_NAME( x ) x GLS_AUTOLIB_SUFFIX GLS_LIB_TYPE GLS_LIB_SUFFIX GLS_LIB_CRT_SUFFIX ".lib"
123# define GLS_AUTOLIBNAME GLS_BUILD_LIB_NAME( LIB_BASE_NAME )
124# if !defined( GLS_AUTOLIB_QUIET )
125# pragma message( "Will automatically link with " GLS_AUTOLIBNAME )
126# endif
127# pragma comment( lib, GLS_AUTOLIBNAME )
128# undef GLS_AUTOLIBNAME
129# undef GLS_BUILD_LIB_NAME
130# endif
131
132#endif //end of WIN32