Rogue Wave banner
Previous fileTop of DocumentContentsNext file

4.2 Macro Descriptions and Use

This section describes the preprocessor macros associated with Rogue Wave products (Table 2), followed by a series of tables that show which build types each macro applies to. Use Table 2 to determine which macros you may need to defined based on the Rogue Wave libraries you are linking to, and the rest of the tables to determine whether those macros are needed by the build configuration you are using.

4.2.1 Macro Definitions by Product

This list is subdivided into general and product-specific groupings. Several of the macros in the general grouping are Windows-specific. Also included in the general grouping are some macros required by Tools.h++, such as REDEBUG. They are included with the general macros because most products, being dependent on Tools.h++, require them.

Rogue Wave has added the macro RWDLL, a single macro that may be used in place of all the product-specific ...DLL macros when compiling DLL applications. Use of RWDLL greatly simplifies command line invocations.

Table 2 -- Preprocessor macros associated with Rogue Wave products

Macro NameDescription 
General -- Applicable to most or all Rogue Wave libraries 
__DLL__
Indicates that the application links to the DLL version of Tools.h++.
_CONSOLE
For MSVC, specifies a console application. (This is the default setting for the MSVC compiler.) Borland uses a compiler flag (see Table 14) for this purpose.
_DEBUG
For MSVC, tells the compiler to use the debug version of the runtime library. This can also be specified with the -MDd or -MTd compiler flags.
_REENTRANT
Automatically defined by Rogue Wave for all multithreaded library builds. You must define this macro when building an application that links to Rogue Wave libraries built with multithreading.
_RTLDLL
Required when building DLLs with the Borland compiler. This option tells the compiler to use the DLL version of the runtime library.
_WINDOWS
For MSVC, specifies a GUI application. Borland uses a compiler flag (see Table 14) for this purpose.
_X86_
Defines the architecture on the Windows platform. Optional.
NDEBUG
For MSVC, tells the compiler to use the release version of the runtime library. This can also be specified with the -MD or -MT compiler flag.
NOMINMAX
Required with MSVC when compiling applications that depend directly or indirectly on Tools.h++ to avoid conflict with Microsoft min() and max() macros.
RWDEBUG
Activates a set of PRECONDITION and POSTCONDITION clauses at the beginning and end of critical functions in Rogue Wave's Standard C++ Library and C++ Library Products. These pre- and post-conditions are implemented with asserts. A failure causes the program to halt after first printing out the offending condition, along with the file and line number where it occurred.
This facility must be used consistently. That is, all files to be linked into your application must have been compiled with RWDEBUG defined, or none must be.
RWDLL
Modifies Rogue Wave header files to support dynamic linking. Define this macro when building any dynamic (also know as shared or DLL) application that links to Rogue Wave libraries.
RW_NO_STL
Indicates you are not using the Rogue Wave implementation of the Standard C++ Library.
WIN32
Defines the environment on the Windows platform. Required.
Standard C++ Library 
_RWSTDDLL
Modifies the Rogue Wave Standard C++ Library header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
Tools.h++ 
_RWTOOLSDLL
Modifies the Tools.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
RWDEBUG
Described in the General macros.
Threads.h++ 
RW_THR_DEBUG
Extends RWDEBUG style debugging to the Threads.h++ library. The consistency requirements are the same as for RWDEBUG. In particular, if you define this macro for the Threads.h++ library, you must also define it when compiling the int library in Tools.h++ Professional, and for any application that links to these libraries or their header files.
RW_THR_DYNAMIC_BINDING
Modifies the Threads.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
This macro (or RWDLL) is also required by the Tools.h++ Professional int library.
RW_THR_RELEASE
Explicitly disables debug assertions in the Threads.h++ library. (See RWDEBUG entry for a description of how these assertions work.) May be defined when building the release version of an application that depends on the Threads.h++ library, although no assertions is the default behavior.
RW_THR_STATIC_BINDING
Tells the compiler to link statically to the Threads.h++ library. May be defined for static applications that link to the Threads.h++ library, although static linking is the default behavior.
RW_THR_USE
Must be defined for any application that links to Threads.h++ library.
Tools.h++ Professional 
_RWINETDLL
Modifies the Tools.h++ Professional int library header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
_RWNETDLL
Modifies the Tools.h++ Professional net library header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
_RWORBSTREAMSBUILD
CUSTOMDLL

Define this macro if you are compiling your own DLL from code that contains the RWDEFINE_OPAQUE macro or the RWDEFINE_OPAQUE_COLLECTALBE macro.
_RWORBSTREAMSDLL
Modifies the Tools.h++ Professional orb library header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
_RWSERDLL
Modifies the Tools.h++ Professional ser library header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
RW_ORBIX_2_2 and RW_ORBIX_2_3
Indicate the version of your Orbix installation.
DBTools.h++ 
_RWDBDLL
Modifies the DBTools.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
Math.h++ 
_RWMATHDLL
Modifies the Math.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
RW_LAPACK
Applied to the Math.h++ library when it is compiled with LAPACK.h++. If you compile Math.h++ in this way, and your application depends on Math.h++, you must use this macro when compiling the application.
Money.h++ 
_RWDCMLDLL
Modifies the Money.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
LAPACK.h++ 
_RWLAPACKDLL
Modifies the LAPACK.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.
Analytics.h++ 
_RWANALYTICSDLL
Modifies the Analytics.h++ header files to support dynamic linking. This macro is referenced by the RWDLL macro, which sets dynamic linking support for all Rogue Wave libraries.

4.2.2 Build Type Usage Matrices

The following tables, the first for general usage macros and the rest for the macros associated with particular products, show which build types each of the macros applies to.

Table 3 -- General macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
__DLL__
                    X
X
    X
X
_CONSOLE
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
_DEBUG
  X
  X
  X
  X
  X
  X
  X
  X
_REENTRANT
    X
X
    X
X
    X
X
    X
X
_RTLDLL
                    X
X
    X
X
_WINDOWS
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
_X86_=1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
NDEBUG
X
  X
  X
  X
  X
  X
  X
  X
 
NOMINMAX
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
RWDLL
                    X
X
    X
X
RWDEBUG
  X
  X
  X
  X
  X
  X
  X
  X
RW_NO_STL
X
X
X
X
        X
X
X
X
       
WIN32
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

Table 4 -- Standard C++ Library macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWSTDDLL
                    X
X
    X
X

Table 5 -- Tools.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWTOOLSDLL
                    X
X
    X
X
NOMINMAX
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
RWDEBUG
  X
  X
  X
  X
  X
  X
  X
  X

Table 6 -- Threads.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
RW_THR_DEBUG
      X
      X
      X
      X
RW_THR_DYNAMIC_
BINDING

                    X
X
    X
X
RW_THR_RELEASE
    X
      X
      X
      X
 
RW_THR_STATIC_
BINDING

    X
X
    X
X
               
RW_THR_USE
    X
X
    X
X
    X
X
    X
X

Table 7 -- Tools.h++ Professional macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWINETDLL
                    X
X
    X
X
_RWNETDLL
                    X
X
    X
X
_RWORBSTREAMS
BUILDCUSTOMDLL

                    X
X
    X
X
_RWORBSTREAMSDLL
                    X
X
    X
X
_RWSERDLL
                    X
X
    X
X

Table 8 -- DBTools.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWDBDLL
                    X
X
    X
X

Table 9 -- Math.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWMATHDLL
                    X
X
    X
X
RW_LAPACK
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

Table 10 -- Money.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWDCMLDLL
                    X
X
    X
X

Table 11 -- LAPACK.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWLAPACKDLL
                    X
X
    X
X

Table 12 -- Analytics.h++ macro usage by build type

Macro NameBuild Types 
StaticDynamic (Shared / DLL)  
0s3s4s7s8s11s12s15s0d3d4d7d8d11d12d15d 
_RWANALYTICSDLL
                    X
X
    X
X


Previous fileTop of DocumentContentsNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.