Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - environment variables can be used to specify commonly used compiler options. http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Environment variables can be used to specify commonly used compiler options.
 There is one environment variable for each compiler (the name of the
environment variable is the same as the compiler name).  The Watcom C/C++
environment variable names are:

WCC
    used with the Watcom C compiler for 16-bit Intel platforms

    Example:

         C>set wcc=/d1 /ot

WPP
    used with the Watcom C++ compiler for 16-bit Intel platforms

    Example:

         C>set wpp=/d1 /ot

WCC386
    used with the Watcom C compiler for 32-bit Intel platforms

    Example:

         C>set wcc386=/d1 /ot

WPP386
    used with the Watcom C++ compiler for 32-bit Intel platforms

    Example:

         C>set wpp386=/d1 /ot


The options specified in environment variables are processed before options
specified on the command line.  The above examples define the default
options to be "d1" (include line number debugging information in the object
file), and "ot" (favour time optimizations over size optimizations).

Whenever you wish to specify an option that requires the use of an "="
character, you can use the "#" character in its place.  This is required by
the syntax of the "SET" command.

Once a particular environment variable has been defined, those options
listed become the default each time the associated compiler is used.  The
compiler command line can be used to override any options specified in the
environment string.

These environment variables are not examined by the Watcom Compile and Link
utilities.  Since the Watcom Compile and Link utilities pass the relevant
options found in their associated environment variables to the compiler
command line, their environment variable options take precedence over the
options specified in the environment variables associated with the
compilers.

Hint:  If you are running DOS and you use the same compiler options all the
time, you may find it handy to define the environment variable in your DOS
system initialization file, AUTOEXEC.BAT.

If you are running Windows NT, use the "System" icon in the Control Panel to
define environment variables.

If you are running OS/2 and you use the same compiler options all the time,
you may find it handy to define the environment variable in your OS/2 system
initialization file, CONFIG.SYS.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson