|
Back to Table of contents |
General information |
The GLOW Toolkit uses a few preprocessor symbols for controlling different compile options and dealing with compatibility issues with older compilers.
Defines |
Option defines
These symbols control a few aspects of the behavior of GLOW. You should set them in your makefile or header prefix file.GLOW_OPTION_DEBUG
If defined, glowDebug debugging facilities will be active.GLOW_OPTION_NOIOSTREAMS
If defined, GLOW will not emit any code that uses iostreams. This affects the services provided by glowDebug and the code generated by the classes in module glowVectorAlgebra.GLOW_OPTION_NOEXCEPTIONS
If defined, GLOW code will not throw any exceptions. Currently has no effect, because the current version of GLOW will not throw exceptions anyway, though that may change in a future release. (Note that language and standard library features such as iostreams and operator new may still throw exceptions.)GLOW_OPTION_USEGLOBALNAMESPACE
If defined, GLOW symbols will be located in the global namespace. Otherwise, they will be located in namespace glow.GLOW_OPTION_GLUTREDISPLAYFIX
If defined, GLOW will implement a partial workaround for a GLUT bug that sometimes causes GLUT to lose track of windows. The workaround involves preventing a program from reposting a refresh event during the drawing callback for that window. If a program attempts to do so, GLOW will defer the event posting until the next iteration through the event loop. The workaround seems to prevent some cases of the GLUT bug, but not all of them. Versions of GLUT newer than 26 June 2000 may fix the bug, so this workaround may not be necessary if your libraries are new enough.Compatibility defines
You may use these symbols to specify details of your development system's ANSI compliance. GLOW for the most part assumes a complete implementation of ANSI/ISO C++, but can tolerate non-compliance in a few details such as namespaces. You should set these defines in your makefile or header prefix file. Some of these symbols are necessary to compile GLOW on compilers that aren't yet completely compliant. Others are not currently necessary, but may be in the future.GLOW_COMPAT_NOSTDNAMESPACE
Define this symbol if the C++ standard library is not located in namespace std.GLOW_COMPAT_CLIBNOSTDNAMESPACE
Define this symbol if the C standard library is not located in namespace std. This is necessary for MSVC++ 6.0 and MIPSPro 7.3.GLOW_COMPAT_USINGSTDINLIBRARY
When this symbol is defined, GLOW will issue the directive using namespace std; internally. There shouldn't be any reason to use this symbol at this point.GLOW_COMPAT_BADFORSCOPING
Define this symbol if your compiler does not use correct scoping of index variables declared in a for loop. Under ANSI/ISO C++, for (int i...) should scope i as if it were declared within the body of the loop, but some older compilers scope i as if it were declared before the for statement. Necessary for MSVC++ 6.0.GLOW_COMPAT_NOSTDMINMAX
Define this symbol if your development environment doesn't include the min and max templates in the standard library. Necessary for MSVC++ 6.0.GLOW_COMPAT_NOTEMPLATESPECIALIZATIONS
Define this symbol if your compiler doesn't fully support template specializations. Necessary for MSVC++ 6.0.Platform specification
You may use these symbols to specify the type of platform you are compiling for. Currently, these are not necessary, but they may be used in the future to tune GLOW's behavior for different platforms.GLOW_PLATFORM_BIGENDIAN
Big-endian architecture. (e.g. MIPS, PowerPC)GLOW_PLATFORM_LITTLEENDIAN
Little-endian architecture. (e.g. Intel)GLOW_PLATFORM_IRIX
SGI IRIX.GLOW_PLATFORM_LINUX
Linux.GLOW_PLATFORM_MACOS
Apple Mac OS.GLOW_PLATFORM_WIN32
Microsoft Win32.
Macros |
Namespace macros
These macros may be used to handle namespace issues if your program may be compiled under different compilers with different levels of namespace compatibility. They are defined by the GLOW system in the header "glowHeader.h".GLOW_STD
The name of the standard namespace. If GLOW_COMPAT_NOSTDNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "std".GLOW_CSTD
The name of the namespace for C library calls. If GLOW_COMPAT_CLIBNOSTDNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "std".GLOW_NAMESPACE
The name of the GLOW namespace. If GLOW_OPTION_USEGLOBALNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "glow".GLOW_NAMESPACE_USING
Issues a "using" directive for the GLOW namespace. If GLOW_OPTION_USEGLOBALNAMESPACE is defined, this expands to the empty string "", otherwise it expands to "using namespace glow;"Other macros
Other macros are defined by the GLOW system in the header "glowHeader.h".GLOW_TOOLKIT
This symbol is #defined once any of the GLOW headers have been included. The actual string it expands to is a nonzero but otherwise unspecified numeric value.GLOW_VERSION
This expands to the version number of the GLOW interfaces being used, as a floating-point constant. The value is of the form a.bbccdd where a is the major release number, b is the major revision number, c is the minor revision number and d is the prerelease number (99 for final). Hence, version 1.3.11pre4 would show up as 1.031104.
|
Back to Table of contents |
The GLOW Toolkit