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 - this option causes the compiler to define the "build" target. this option http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
This option causes the compiler to define the "build" target.  This option
is used for cross-development work.  It prevents the compiler from defining
the default build target (which is based on the host system the compiler is
running on).  The default build targets are:

DOS
    when the host operating system is DOS,

OS2
    when the host operating system is OS/2,

NT
    when the host operating system is Windows NT (including Windows 95), or

QNX
    when the host operating system is QNX.

It also prevents the compiler from defining the default target macro.
 Instead the compiler defines a macro consisting of the string "<os>"
converted to uppercase and prefixed and suffixed with two underscores.  The
default target macros are described in the section entitled
Watcom C/C++ Predefined Macros.

For example, specifying the option:


     bt=foo

would cause the compiler to define the macro


     __FOO__

and prevent it from defining MSDOS , _DOS and __DOS__ if the compiler was
being run under DOS, __OS2__ if using the OS/2 hosted compiler, __NT__ if
using the Windows NT or Windows 95 hosted compiler, or __QNX__ if using the
QNX hosted version.  Any string consisting of letters, digits, and the
underscore character may be used for the target name.

The compiler will also construct an environment variable called <os>_INCLUDE
and see if it has been defined.  If the environment variable is defined then
each directory listed in it is searched (in the order that they were
specified).  For example, the environment variable WINDOWS_INCLUDE will be
searched if bt=WINDOWS option was specified.

Example:

     set windows_include=\watcom\h\win

Include file processing is described in the section entitled
Watcom C/C++ #include File Processing.

Several target names are recognized by the compiler and perform additional
operations.

Target name
    Additional operation

DOS
    Defines the macros _DOS and MSDOS.

WINDOWS
    Same as specifying one of the "zw" options.  Defines the macros _WINDOWS
    (16-bit only) and __WINDOWS_386__ (32-bit only).

NETWARE
    (32-bit only) Causes the compiler to use stack-based calling
    conventions.  Also defines the macro __NETWARE_386__.

Specifying "bt" with no target name following restores the default target
name.

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