home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft_Programmers_Library.7z / MPL / msc / qctlk.txt < prev    next >
Encoding:
Text File  |  2013-11-08  |  861.6 KB  |  20,806 lines

  1.  Microsoft QuickC Compiler - TOOL KIT
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  ────────────────────────────────────────────────────────────────────────────
  11.                   Microsoft(R) QuickC(R) Compiler - TOOL KIT
  12.  
  13.                                  VERSION 2.5
  14.  ────────────────────────────────────────────────────────────────────────────
  15.  
  16.  
  17.                             MICROSOFT CORPORATION
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  Information in this document is subject to change without notice and does
  27.  not represent a commitment on the part of Microsoft Corporation. The
  28.  software described in this document is furnished under a license agreement
  29.  or nondisclosure agreement. The software may be used or copied only in
  30.  accordance with the terms of the agreement. It is against the law to copy
  31.  the software on any medium except as specifically allowed in the license or
  32.  nondisclosure agreement. No part of this manual may be reproduced or trans-
  33.  mitted in any form or by any means, electronic or mechanical, including
  34.  photocopying and recording, for any purpose without the express written
  35.  permission of Microsoft.
  36.  (C) Copyright Microsoft Corporation, 1988, 1990. All rights reserved.
  37.  
  38.  
  39.  Printed and bound in the United States of America.
  40.  
  41.  
  42.  Microsoft, MS, MS-DOS, CodeView, QuickC, and XENIX are
  43.  registered trademarks and Windows is a trademark of Microsoft Corporation.
  44.  
  45.  COMPAQ is a registered trademark of Compaq Computer Corporation.
  46.  
  47.  Hercules is a registered trademark and InColor is a trademark
  48.  of Hercules Computer Technology.
  49.  
  50.  Intel is a registered trademark of Intel Corporation.
  51.  
  52.  IBM is a registered trademark of International Business
  53.  Machines Corporation.
  54.  
  55.  Document No. SY10425-0290
  56.   OEM D703-2Z
  57.  10 9 8 7 6 5 4 3 2 1
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  Table of Contents
  65.  ────────────────────────────────────────────────────────────────────────────
  66.  
  67.  
  68.  
  69.  Introduction
  70.       About This Manual
  71.       Elsewhere in This Package
  72.       Key to Document Conventions
  73.  
  74.  
  75.  PART I  Tool Kit Tutorial
  76.  ────────────────────────────────────────────────────────────────────────────
  77.  
  78.  
  79.  Chapter 1  Creating Executable Programs
  80.  
  81.       1.1   Compiling and Linking: An Overview
  82.       1.2   Using the QCL Command
  83.       1.3   Specifying File Names
  84.       1.4   Controlling Compiling and Linking with QCL Options
  85.              1.4.1    Compiling without Linking
  86.              1.4.2    Compiling Only Modified Functions
  87.              1.4.3    Optimizing Programs
  88.              1.4.4    Naming Output Files
  89.              1.4.5    Turning Off Language Extensions
  90.              1.4.6    Debugging and Syntax Checking
  91.              1.4.7    Controlling the Preprocessor
  92.              1.4.8    Compiling for Specific Hardware
  93.              1.4.9    Choosing Memory Models
  94.              1.4.10   Controlling the Linking Process
  95.              1.4.11   Other QCL Options
  96.       1.5   Invoking the Linker Directly: The QLINK Command
  97.              1.5.1    Giving Input to the QLINK Command
  98.              1.5.2    QLINK Options
  99.  
  100.  Chapter 2  Maintaining Software Libraries with LIB
  101.  
  102.       2.1   Why Use a Library?
  103.       2.2   The LIB Command
  104.       2.3   Listing the Contents of a Library
  105.       2.4   Modifying the Contents of a Library
  106.              2.4.1    Modifying the Library
  107.              2.4.2    Adding a Module
  108.              2.4.3    Deleting a Module
  109.              2.4.4    Replacing a Module
  110.              2.4.5    Copying and Moving Modules from a Library
  111.       2.5   Creating a New Library
  112.       2.6   Other Ways of Using LIB
  113.  
  114.  Chapter 3  Maintaining Programs with NMAKE
  115.  
  116.       3.1   How NMAKE Works
  117.       3.2   Building a Simple Description File
  118.              3.2.1    Description Blocks
  119.              3.2.2    The CC Macro
  120.       3.3   Invoking NMAKE
  121.              3.3.1    Invoking NMAKE from the DOS Command Line
  122.              3.3.2    Invoking NMAKE with a Response File
  123.       3.4   NMAKE Options
  124.              3.4.1    Controlling Input
  125.              3.4.2    Controlling Execution
  126.              3.4.3    Controlling Output
  127.       3.5   Building Complex Description Files
  128.              3.5.1    Using Special Characters to Modify Commands
  129.              3.5.2    Using Macros
  130.              3.5.3    Using Inference Rules
  131.              3.5.4    Using Directives
  132.       3.6   Other NMAKE Features
  133.  
  134.  
  135.  PART II  Reference to QuickC Tools
  136.  ────────────────────────────────────────────────────────────────────────────
  137.  
  138.  
  139.  Chapter 4  QCL Command Reference
  140.  
  141.       4.1   The QCL Command Line
  142.       4.2   How the QCL Command Works
  143.       4.3   QCL Options
  144.              4.3.1    /A Options (Memory Models)
  145.              4.3.2    /batch (Compile in Batch Mode)
  146.              4.3.3    /c (Compile without Linking)
  147.              4.3.4    /C (Preserve Comments during Preprocessing)
  148.              4.3.5    /D (Define Constants and Macros)
  149.              4.3.6    /E (Copy Preprocessor Output to Standard Output)
  150.              4.3.7    /EP (Copy Preprocessor Output to Standard Output)
  151.              4.3.8    /F (Set Stack Size)
  152.              4.3.9    /Fe (Rename Executable File)
  153.              4.3.10   /Fm (Create Map File)
  154.              4.3.11   /Fo (Rename Object File)
  155.              4.3.12   /FP Options (Select Floating-Point-Math Package)
  156.              4.3.13   /G0, /G1, /G2 (Generate Instructions for 8086, 80186,
  157.                          or 80286 Processor)
  158.              4.3.14   /Gc, /Gd (Use FORTRAN/Pascal or C Calling Convention)
  159.              4.3.15   /Ge, /Gs (Turn Stack Checking On or Off)
  160.              4.3.16   /Gi (Use Incremental Compilation)
  161.              4.3.17   /Gr (Register Calling Convention)
  162.              4.3.18   /Gt (Set Data Threshold)
  163.              4.3.19   /Gw,
  164.                          /GW (Generate Code for Windows(tm) Function Calls)
  165.              4.3.20   /HELP (List the Compiler Options)
  166.              4.3.21   /I (Search Directory for Include Files)
  167.              4.3.22   /J (Change Default char Type)
  168.              4.3.23   /Lc, Lr (Compile for Real Mode)
  169.              4.3.24   /Li (Link Incrementally)
  170.              4.3.25   /Ln (Link without C Run-Time Startup Code)
  171.              4.3.26   /ND, /NT (Name the Data or Code Segments)
  172.              4.3.27   /nologo (Suppress Display of Sign-On Banner)
  173.              4.3.28   /O Options (Optimize Program)
  174.              4.3.29   /P (Create Preprocessor-Output File)
  175.              4.3.30   /Ta, /Tc (Specify Assembly Language or C Source File)
  176.              4.3.31   /U, /u (Remove Predefined Names)
  177.              4.3.32   /V (Set Version String)
  178.              4.3.33   /W, /w (Set Warning Level)
  179.              4.3.34   /X (Ignore Standard Include Directory)
  180.              4.3.35   /Ze, /Za (Enable or Disable Language Extensions)
  181.              4.3.36   /Zi, /Zd (Compile for Debugging)
  182.              4.3.37   /Zl (Remove Default-Library Name from Object File)
  183.              4.3.38   /Zp (Pack Structure Members)
  184.              4.3.39   /Zr (Check Pointers)
  185.              4.3.40   /Zs (Check Syntax Only)
  186.              4.3.41   Giving Options with the CL Environment Variable
  187.       4.4   Controlling Stack and Heap Allocation
  188.  
  189.  Chapter 5  QLINK
  190.  
  191.       5.1   Overview
  192.       5.2   Invoking QLINK
  193.              5.2.1    Command Line
  194.              5.2.2    Prompts
  195.              5.2.3    Response File
  196.              5.2.4    How QLINK Searches for Libraries
  197.       5.3   QLINK Memory Requirements
  198.       5.4   QLINK Options
  199.              5.4.1    /BA (Running in Batch Mode)
  200.              5.4.2    /CO (Link for Debugging)
  201.              5.4.3    /CP (Set the Maximum Allocation Space)
  202.              5.4.4    /DO (Order Segments)
  203.              5.4.5    /DS (Load Data at High Address)
  204.              5.4.6    /E (Pack Executable Files)
  205.              5.4.7    /F (Optimize Far Calls)
  206.              5.4.8    /HE (View the Options List)
  207.              5.4.9    /HI (Place Executable in High Memory)
  208.              5.4.10   /INC (Prepare for ILINK)
  209.              5.4.11   /INF (Display Linker-Process Information)
  210.              5.4.12   /LI (Include Line Numbers in Map File)
  211.              5.4.13   /M (List Public Symbols)
  212.              5.4.14   /NOD (Ignore Default Libraries)
  213.              5.4.15   /NOE (Ignore Extended Dictionary)
  214.              5.4.16   /NOF (Disable Far-Call Optimization)
  215.              5.4.17   /NOG (Preserve Compatibility)
  216.              5.4.18   /NOI (Employ Case Sensitivity)
  217.              5.4.19   /NOL (Suppress Sign-On Banner)
  218.              5.4.20   /NON (Order Segments without Nulls)
  219.              5.4.21   /NOP (Disable Segment Packing)
  220.              5.4.22   /O (Set the Overlay Interrupt)
  221.              5.4.23   /PACKC (Pack Contiguous Segments)
  222.              5.4.24   /PACKD (Pack Contiguous Data)
  223.              5.4.25   /PADC (Pad Code Segments)
  224.              5.4.26   /PADD (Pad Data Segments)
  225.              5.4.27   /PAU (Pause during Linking)
  226.              5.4.28   /SE (Set Maximum Number of Segments)
  227.              5.4.29   /ST (Set Stack Size)
  228.              5.4.30   /T (Create a .COM File)
  229.       5.5   Linker Operation
  230.              5.5.1    Alignment of Segments
  231.              5.5.2    Frame Number
  232.              5.5.3    Order of Segments
  233.              5.5.4    Combined Segments
  234.              5.5.5    Groups
  235.              5.5.6    Fixups
  236.       5.6   Using Overlays
  237.              5.6.1    Restrictions on Overlays
  238.              5.6.2    Overlay-Manager Prompts
  239.  
  240.  Chapter 6  LIB
  241.  
  242.       6.1   Invoking LIB
  243.              6.1.1    Command Line
  244.              6.1.2    Prompts
  245.              6.1.3    Response File
  246.       6.2   LIB Commands
  247.              6.2.1    Creating a Library File
  248.              6.2.2    Add Command (+)
  249.              6.2.3    Delete Command (-)
  250.              6.2.4    Replace Command (- +)
  251.              6.2.5    Copy Command (*)
  252.              6.2.6    Move Command (- *)
  253.  
  254.  Chapter 7  NMAKE
  255.  
  256.       7.1   Overview of NMAKE
  257.              7.1.1    Using a Command Line to Invoke NMAKE
  258.       7.2   NMAKE Description Files
  259.              7.2.1    Description Blocks
  260.              7.2.2    Comments
  261.              7.2.3    Macros
  262.              7.2.4    Inference Rules
  263.              7.2.5    Directives
  264.              7.2.6    Pseudotargets
  265.       7.3   Command-Line Options
  266.       7.4   Using a Response File to Invoke NMAKE
  267.       7.5   The TOOLS.INI File
  268.       7.6   In-Line Files
  269.       7.7   NMAKE Operations Sequence
  270.  
  271.  Appendix A  Exit Codes
  272.  
  273.       A.1   Exit Codes with NMAKE
  274.       A.2   Exit Codes with DOS Batch Files
  275.       A.3   Exit Codes for Programs
  276.              A.3.1    QLINK Exit Codes
  277.              A.3.2    LIB Exit Codes
  278.              A.3.3    NMAKE Exit Codes
  279.  
  280.  Appendix B  Working with QuickC Compiler Memory Models
  281.  
  282.       B.1   Near, Far, and Huge Addressing
  283.       B.2   Using the Standard Memory Models
  284.              B.2.1    Creating Tiny-Model Programs
  285.              B.2.2    Creating Small-Model Programs
  286.              B.2.3    Creating Medium-Model Programs
  287.              B.2.4    Creating Compact-Model Programs
  288.              B.2.5    Creating Large-Model Programs
  289.              B.2.6    Creating Huge-Model Programs
  290.       B.3   Using the _near, _far, and _huge Keywords
  291.              B.3.1    Library Support for _near, _far, and _huge
  292.              B.3.2    Declaring Data with _near, _far, and _huge
  293.              B.3.3    Declaring Functions with the _near and _far Keywords
  294.              B.3.4    Pointer Conversions
  295.  
  296.  Appendix C  Hardware-Specific Utilities
  297.  
  298.       C.1   Fixing Keyboard Problems with FIXSHIFT
  299.       C.2   Using Hercules Graphics
  300.              C.2.1    Support for Cards and Display Characteristics
  301.              C.2.2    The MSHERC Driver
  302.              C.2.3    Using a Mouse
  303.              C.2.4    Setting Hercules Graphics Mode
  304.       C.3   The Mouse Driver
  305.  
  306.  Appendix D  Error Messages
  307.  
  308.       D.1   Compiler Errors
  309.              D.1.1    Fatal Error Messages
  310.              D.1.2    Compilation Error Messages
  311.              D.1.3    Warning Messages
  312.              D.1.4    Compiler Limits
  313.       D.2   Command-Line Errors
  314.              D.2.1    Command-Line Error Messages
  315.              D.2.2    Command-Line Warning Messages
  316.       D.3   Run-Time Errors
  317.              D.3.1    Math Error Messages
  318.              D.3.2    Run-Time Error Messages
  319.       D.4   QLINK Error Messages
  320.              D.4.1    Fatal Error Messages
  321.              D.4.2    Error Messages
  322.              D.4.3    Warning Messages
  323.       D.5   LIB Error Messages
  324.              D.5.1    LIB Fatal Error Messages
  325.              D.5.2    LIB Warning Messages
  326.       D.6   NMAKE Error Messages
  327.              D.6.1    Fatal Error Messages
  328.              D.6.2    Compilation Error Message
  329.              D.6.3    Warning Messages
  330.  
  331.  Glossary
  332.  
  333.  
  334.  Index
  335.  
  336.  
  337.  
  338.  
  339.  Introduction
  340.  ────────────────────────────────────────────────────────────────────────────
  341.  
  342.  The Microsoft(R) QuickC(R) Compiler Tool Kit is a set of utility programs
  343.  that you can use to develop your own programs outside the QuickC integrated
  344.  environment. These tools include
  345.  
  346.  
  347.    ■   QCL, the Microsoft QuickC compiler, which compiles QuickC source
  348.        programs and invokes QLINK (see below) to link object files
  349.  
  350.    ■   QLINK, the QuickC linker, which combines object files that you've
  351.        created with the Microsoft QuickC compiler (or any other Microsoft
  352.        language product) into executable programs
  353.  
  354.    ■   LIB, the Microsoft Library Manager, which combines object files into
  355.        libraries
  356.  
  357.    ■   NMAKE, the Microsoft Program-Maintenance Utility, which maintains
  358.        large programs that consist of separate modules
  359.  
  360.    ■   The special-purpose utilities, including MSHERC (which provides
  361.        support for Hercules(R) graphics adapters) and FIXSHIFT (which fixes a
  362.        bug in certain keyboards that makes them incompatible with QuickC and
  363.        some other programs)
  364.  
  365.  
  366.  The Tool Kit provides an alternative to the QuickC environment by letting
  367.  you compile and link from the command line. You may find that it's easiest
  368.  to use the integrated environment during the early stages of program
  369.  development, when you're still tinkering with programs and you need to
  370.  compile, run, and debug programs fast. Then, when you're fine-tuning and
  371.  maintaining your code, use the tools from the Tool Kit for additional
  372.  control and flexibility.
  373.  
  374.  ────────────────────────────────────────────────────────────────────────────
  375.  NOTE
  376.  
  377.  Microsoft documentation uses the term "OS/2" to refer to the OS/2
  378.  systems─Microsoft Operating System/2 (MS(R) OS/2) and IBM(R) OS/2.
  379.  Similarly, the term "DOS" refers to both the MS-DOS(R) and IBM Personal
  380.  Computer DOS operating systems. The name of a specific operating system is
  381.  used when it is necessary to note features that are unique to that system.
  382.  ────────────────────────────────────────────────────────────────────────────
  383.  
  384.  
  385.  About This Manual
  386.  
  387.  If you're new to Microsoft language products, this book will teach you how
  388.  to get the most out of the tools provided in this package. Experienced users
  389.  of Microsoft languages will be able to find information about existing
  390.  utilities quickly, as well as learn about the utilities provided with QuickC
  391.  (including the NMAKE utility and the hardware-specific support utilities
  392.  documented in Appendix C, "Hardware-Specific Utilities").
  393.  
  394.  Part 1 of the manual is a tutorial that illustrates the ways you'll use the
  395.  QCL, QLINK, LIB, and NMAKE utilities for everyday programming work. Each
  396.  chapter describes the most common options of each utility.
  397.  
  398.  Part 2 is a reference to the Tool Kit. Each chapter describes a tool in
  399.  detail, showing the syntax of the command line and describing all of the
  400.  tool's options and their effects.
  401.  
  402.  Appendixes of this manual list the exit codes returned by each tool, explain
  403.  the use of QuickC memory models, describe the MSHERC and FIXSHIFT utilities,
  404.  and describe the error messages associated with each tool.
  405.  
  406.  Following the appendixes is a glossary, which defines the terms introduced
  407.  in this manual, as well as other C-specific terms you may find helpful.
  408.  
  409.  
  410.  Elsewhere in This Package
  411.  
  412.  As you're reading this manual, you may want to refer to other manuals or
  413.  online documentation for information about other parts of the product. This
  414.  manual assumes that you've installed the QuickC compiler software as
  415.  described in Up and Running. If you haven't yet installed the software,
  416.  install it now.
  417.  
  418.  Read C for Yourself if you're new to C programming and want to learn how to
  419.  write C programs. That manual includes an appendix that summarizes the C
  420.  language and common C library routines.
  421.  
  422.  Insert the disk titled "Learning the QuickC Environment" and type  learn  if
  423.  you want to learn how to use the QuickC integrated environment. The lesson
  424.  titled "Basic Skills" shows how to get online help for any command or option
  425.  within the environment or for any part of the C language or run-time
  426.  library.
  427.  
  428.  
  429.  Key to Document Conventions
  430.  
  431.  This book uses the following document conventions:
  432.  
  433.  Examples                          Description
  434.  ────────────────────────────────────────────────────────────────────────────
  435.  STDIO.H, PATH, C:\BIN, QCL,       Uppercase letters indicate file names,
  436.  NMAKE, DX, _TEXT                  segment names, registers, and terms used
  437.                                    at the DOScommand level.
  438.  
  439.  _cdecl, int, printf, alloc_text,  Boldface letters indicate C keywords,
  440.  #undef, DosCreateThread           operators,
  441.                                    language-specific characters, and
  442.                                    library functions, as well as OS/2
  443.                                    functions.
  444.  
  445.  QCL A.C B.C C.OBJ                 This font is used for examples, user
  446.                                    input, program output, and error
  447.                                    messages in text.
  448.  
  449.  if (expression)                   Italic letters indicate placeholders for
  450.  statement1                        information you must supply, such as a
  451.                                    file name. Italics are also occasionally
  452.                                    used for emphasis in the text.
  453.  
  454.  «option»                          Items inside double square brackets are
  455.                                    optional.
  456.  
  457.  #pragma pack {1 | 2}              Braces and a vertical bar indicate a
  458.                                    choice among two or more items. You must
  459.                                    choose one of these items unless double
  460.                                    square brackets surround the braces.
  461.  
  462.  QCL options «file...»             Three dots following an item indicate
  463.                                    that more items having the same form may
  464.                                    appear.
  465.  
  466.   while()                          A column of three dots tells you that
  467.  {                                 part of the example program has been
  468.     .                              intentionally omitted.
  469.     .
  470.     .
  471.  }
  472.  
  473.  CTRL+ENTER                        Small capital letters are used for the
  474.                                    names of keys on the keyboard. When you
  475.                                    see a plus sign (+) between two key
  476.                                    names, you should hold down the first
  477.                                    key while pressing the second. The
  478.                                    carriagereturn key, sometimes appearing
  479.                                    as a bent arrow on the keyboard, is
  480.                                    called ENTER.
  481.  
  482.  Color Graphics                    The first time an acronym is used, it is
  483.  Adapter (CGA)                     often spelled out.
  484.  
  485.  "argument"                        Quotation marks enclose a new term the
  486.                                    first time it is defined in text.
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  PART I  Tool Kit Tutorial
  494.  ────────────────────────────────────────────────────────────────────────────
  495.  
  496.  The Microsoft QuickC Compiler Tool Kit is divided into two parts. Part 1 is
  497.  a tutorial designed to get you started with the QuickC tools. It does not
  498.  cover the tools in detail, but instead gives you a "quick start" on the
  499.  options and procedures that you are most likely to need. If you are new to
  500.  the QuickC Compiler, consult Part 1 to learn how to use the Tool Kit and to
  501.  become familiar with the most useful options of each tool. After you've
  502.  gained some experience with the tools, turn to Part 2, "Reference to QuickC
  503.  Tools," for the "nuts and bolts" of each tool.
  504.  
  505.  Part 1 starts with QCL and LINK, the fundamental tools you must use to
  506.  create executable programs outside the QuickC environment. It goes on to the
  507.  Library Manager (LIB), with which you can create libraries of compiled code.
  508.  The part concludes with NMAKE, a program-maintenance utility that helps you
  509.  automate the process of rebuilding software.
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  Chapter 1  Creating Executable Programs
  517.  ────────────────────────────────────────────────────────────────────────────
  518.  
  519.  Version 2.5 of the Microsoft QuickC Compiler environment is designed for
  520.  maximum convenience and efficiency. If you prefer, however, you can also
  521.  create programs from the DOS command line. The QuickC Compiler provides two
  522.  programs for this purpose: QCL and QLINK.
  523.  
  524.  This chapter introduces the basic concepts and the most common options of
  525.  the QCL and QLINK commands. See Chapter 4, "QCL Command Reference," in Part
  526.  2 of this manual for a complete description of all the QCL options (listed
  527.  alphabetically). See Chapter 5, "QLINK," also in Part 2, for a complete
  528.  explanation of how QLINK works.
  529.  
  530.  
  531.  1.1  Compiling and Linking: An Overview
  532.  
  533.  The first step in creating a QuickC program is to enter the source code
  534.  using an editor and save it in a file. This file is known as a C "source
  535.  file." You can enter separate parts of the program in different source files
  536.  and compile these source files separately.
  537.  
  538.  Once you've saved your C source file(s), two steps are required to convert
  539.  it to an executable file:
  540.  
  541.  
  542.    1.  Compiling. During this step, the QuickC compiler converts the C source
  543.        files to object files. An object file contains binary code but is not
  544.        yet in execut-able form.
  545.  
  546.    2.  Linking. During this step, the linker takes the object files created
  547.        during compilation, combines them with standard libraries plus any
  548.        other object files and libraries you specify, and creates an
  549.        executable file that can be run under DOS.
  550.  
  551.  
  552.  You can use the QCL command to perform both compiling and linking. On the
  553.  QCL command line, give the names of any C source files that you want to
  554.  compile and the names of any additional object files or libraries that you
  555.  want to link. As an example, consider the following simple command:
  556.  
  557.    QCL SAMPLE.C EXAMPLE.C
  558.  
  559.  This command tells QCL to compile and link the source files SAMPLE.C and
  560.  EXAMPLE.C. The QCL command performs these two steps:
  561.  
  562.  
  563.    1.  QCL compiles the source files SAMPLE.C and EXAMPLE.C and creates
  564.        object files. The object files created by QCL have the same base name
  565.        as the source files, plus the extension .OBJ.
  566.  
  567.    2.  The linker links the object files that were created in the compiling
  568.        step with the default library, SLIBCE.LIB. (QLINK uses this particular
  569.        library because there are no command-line options that specify
  570.        otherwise. See Section 4.3.1, "/A Options," for the names of the other
  571.        possible libraries.) QLINK then creates the final executable file,
  572.        SAMPLE.EXE, giving it the base name of the first source file specified
  573.        on the command line (SAMPLE), plus the extension .EXE.
  574.  
  575.  
  576.  The two steps described above are illustrated in Figure 1.1.
  577.  
  578.  (This figure may be found in the printed book.)
  579.  
  580.  Figure 1.1 and the command it illustrates give a simple demonstration of
  581.  what QCL can do. You can also use QCL to compile and link any combination of
  582.  source files, object files, and additional libraries. The following section
  583.  explains the syntax of the QCL command, which you can use to control more
  584.  complex compile/link operations.
  585.  
  586.  
  587.  1.2  Using the QCL Command
  588.  
  589.  The QCL command, which you'll use for most compiling and linking operations,
  590.  has the following format:
  591.  
  592.  (This figure may be found in the printed book.)
  593.  
  594.  The items in italics are different pieces of input (described below) that
  595.  you must give on the QCL command line:
  596.  
  597.  
  598.    ■   The options are QCL options, which control some aspect of the
  599.        compiling or linking process. They may appear anywhere on the command
  600.        line and in most cases affect any files that appear later on the
  601.        command line. The most commonly used QCL options are described in
  602.        Section 1.4, "Controlling Compiling and Linking with QCL Options." See
  603.        Chapter 4, "QCL Command Reference," for complete information on all
  604.        QCL options.
  605.  
  606.    ■   The sourcefiles are the names of the C source files that you are
  607.        compiling.  Normally, these file names have .C extensions.
  608.  
  609.    ■   The objfiles are the names of additional object files that you want to
  610.        link into your program. QCL compiles the source files, then links the
  611.        resulting object files with objfiles. For example, given the command
  612.  
  613.        QCL MAIN.C AUX.OBJ
  614.  
  615.  
  616.        QCL compiles MAIN.C, creating the object file MAIN.OBJ. QCL then tells
  617.        the linker to link MAIN.OBJ and AUX.OBJ to create the executable file
  618.        named MAIN.EXE.
  619.  
  620.        If you give a file name with any extension other than .C or .LIB, or
  621.        with no extension, QCL assumes you are giving it the name of an object
  622.        file. For example, in the command
  623.  
  624.        QCL OBJECT1 OBJECT2.OBJ
  625.  
  626.        the QCL command assumes OBJECT1 has the .OBJ extension and tells the
  627.        linker to link OBJECT1.OBJ and OBJECT2.OBJ.
  628.  
  629.  
  630.  
  631.    ■   The libraries are the names of libraries that you want to link with.
  632.        These names must have .LIB extensions.
  633.  
  634.        Ordinarily, you don't need to give a library name unless your program
  635.        calls functions that are stored in libraries other than the standard
  636.        combined C libraries (which you created during installation). If you
  637.        use libraries created
  638.  
  639.        by a company other than Microsoft, or if you have created a private
  640.        library of functions and your program calls functions in this library,
  641.        you must give the private-library name on the QCL command line. For
  642.        example, the command
  643.  
  644.        QCL MAIN.C MYLIB.LIB
  645.  
  646.        tells QCL to compile MAIN.C, creating the object file MAIN.OBJ. Then
  647.        QCL tells the linker to link MAIN.OBJ with functions in the default
  648.        combined library SLIBCE.LIB and the MYLIB.LIB library given on the
  649.        command line.
  650.  
  651.    ■   The linkoptions are linker options, which control some aspects of the
  652.        linking process. Linker options are described in Section 1.4.10,
  653.        "Controlling the Linking Process."
  654.  
  655.    ■   If you're not sure that your program will fit in available memory, you
  656.        can indicate that certain parts of the program will become "overlays."
  657.        That is, they will be stored on disk and read into
  658.        memory─overlaid─only when needed.  To specify overlays, enclose the
  659.        modules you want to overlay in parentheses on the QCL command line.
  660.        For example, the command
  661.  
  662.        QCL RESIDNT.C (ONCALL.C) MAIN.C
  663.  
  664.  
  665.        creates a program named RESIDNT.EXE with an overlay module named
  666.        ONCALL.OBJ. Whenever control passes to ONCALL.OBJ, it is read into
  667.        memory from disk. (See Section 5.6, "Using Overlays," for more
  668.        information about overlays and restrictions on their use.)
  669.  
  670.  
  671.  
  672.  1.3  Specifying File Names
  673.  
  674.  A DOS file name has two parts: the "base name," which includes up to eight
  675.  characters before the period (.), and the "extension," which includes the
  676.  period and up to three characters following the period. The extension
  677.  identifies the type of the file. The QCL command uses the extension of each
  678.  file name to determine how to process the corresponding file, as explained
  679.  in Table 1.1.
  680.  
  681.   Uppercase and lowercase
  682.  
  683.  In file names, any combination of uppercase and lowercase letters is legal.
  684.  For example, SHUTTLE.C and Shuttle.c represent the same file.
  685.  
  686.   Path names
  687.  
  688.  Any file name can include a path name. When a file name includes a path
  689.  name, QCL assumes the file to be in that path. You can supply either a full
  690.  path name or a partial path name. A full path name includes a drive name and
  691.  one or more directory names. A partial path name is the same as a full path
  692.  name but omits the drive name, which QCL assumes to be the current drive.
  693.  
  694.  If you don't give a path name, QCL assumes that all source and object files
  695.  given on the command line are in the current directory.
  696.  
  697.  
  698.  Examples
  699.  
  700.    QCL MAIN.C AUX.C OBJECT1.OBJ OBJECT2 OBJECT3.MOD
  701.  
  702.  This command line compiles the files MAIN.C and AUX.C, creating object files
  703.  named MAIN.OBJ and AUX.OBJ. These object files are then linked with the
  704.  object files OBJECT1.OBJ, OBJECT2.OBJ, and OBJECT3.MOD to form an executable
  705.  file named MAIN.EXE (since the base name of the first file on the command
  706.  line is MAIN). Note that QCL assumes the extension .OBJ for OBJECT2 because
  707.  no extension is given on the command line.
  708.  
  709.    QCL TEAPOT.C \MSG\ERROR C:\GRAPHICS\GRAPHICS.LIB
  710.  
  711.  This command line tells QCL to compile the file TEAPOT.C and to link the
  712.  resulting object file with \MSG\ERROR.OBJ and the library GRAPHICS.LIB. QCL
  713.  assumes the extension .OBJ for the file \MSG\ERROR because none was
  714.  specified. It looks for the library in the \GRAPHICS directory on drive C:.
  715.  
  716.  
  717.  Table   1.1 Interpretation of File Extensions
  718.  
  719. ╓┌──────────────────────────────┌─────────────┌──────────────────────────────╖
  720.  Extension                      Assumed Type  Processing
  721.  ────────────────────────────────────────────────────────────────────────────
  722.  .C                             C source      QCL compiles the file.
  723.  
  724.  .OBJ                           Object        QCL tells the linker to link
  725.                                               the file.
  726.  
  727.  .LIB                           Library       The linker links this library
  728.                                               with the object files QCL
  729.                                               created from source files and
  730.                                               the object files given on the
  731.                                               command line.
  732.  
  733.  Any other extension or none    Object        QCL tells the linker to link
  734.                                               the file. You must end the
  735.                                               file name with a period (.)
  736.                                               if the file name has no
  737.  Extension                      Assumed Type  Processing
  738.  ────────────────────────────────────────────────────────────────────────────
  739.                                              if the file name has no
  740.                                               extension. Otherwise, QCL
  741.                                               assumes the extension .OBJ.
  742.  
  743.  ────────────────────────────────────────────────────────────────────────────
  744.  
  745.  
  746.  
  747.  
  748.  1.4  Controlling Compiling and Linking with QCL Options
  749.  
  750.  The QCL command offers a variety of options that control the compiling and
  751.  linking processes and modify the files created during each stage. For
  752.  example, you can specify QCL options to rename output files, to control the
  753.  operation of the QuickC preprocessor, to take advantage of an 80286
  754.  processor or a math coprocessor, or to optimize your program for speed or
  755.  size.
  756.  
  757.  QCL options can begin with either a forward slash ( / ) or a dash (-). In
  758.  this book, the slash is used.
  759.  
  760.  ────────────────────────────────────────────────────────────────────────────
  761.  Important
  762.  
  763.  Except as noted, QCL options are case sensitive, so you must use the exact
  764.  combination of uppercase and lowercase letters shown in this book.
  765.  ────────────────────────────────────────────────────────────────────────────
  766.  
  767.  Some QCL options require arguments. For example, you may be required to give
  768.  a number or a file name as part of a QCL option. For some options, you must
  769.  put a space between the option and the argument; for others, you must place
  770.  the argument immediately after the option. The description of each option
  771.  gives its exact syntax.
  772.  
  773.  The following sections list the most commonly used QCL options by type. See
  774.  Chapter 4, "QCL Command Reference," for a complete list of QCL options or
  775.  for more information about the effects of an option described in this
  776.  chapter.
  777.  
  778.   Help with QCL options
  779.  
  780.  If you need help with QCL options, use the following command:
  781.  
  782.    QCL /HELP
  783.  
  784.  This command displays a list of commonly used QCL options with a brief
  785.  description of each option. Unlike other QCL options, /HELP is not case
  786.  sensitive; you can type any combination of lowercase and uppercase letters.
  787.  
  788.  
  789.  
  790.  1.4.1  Compiling without Linking
  791.  
  792.  When you compile with the /c option, QCL compiles the source files you give
  793.  on the command line but ignores any object files or libraries that you give
  794.  on the command line. Because QCL does not invoke the linker when you give
  795.  this option, it does not create an executable file.
  796.  
  797.  You can use this option in the following cases:
  798.  
  799.  
  800.    ■   To compile separate modules that you want to put in a library using
  801.        the LIB utility (described in Chapter 2 of this book)
  802.  
  803.    ■   To link in a separate step as described later in this chapter (for
  804.        example, in an NMAKE file)
  805.  
  806.  
  807.  
  808.  Example
  809.  
  810.    QCL /c SPELL.C THESRS.C
  811.  
  812.  The example above compiles the C source files SPELL.C and THESRS.C, creating
  813.  the object files SPELL.OBJ and THESRS.OBJ. Because the /c option keeps QCL
  814.  from invoking the linker, this command doesn't create an executable file.
  815.  
  816.  
  817.  1.4.2  Compiling Only Modified Functions
  818.  
  819.  The /Gi option allows you to compile programs much faster than usual. It
  820.  speeds compilation by telling QCL to compile only the parts of each C source
  821.  file that have changed since the file was last compiled. This process is
  822.  called "incremental compilation."
  823.  
  824.  Information about the incremental compilation of each source file is
  825.  maintained in an MDT (Module Description Table) file. One MDT file can
  826.  contain this information for more than one source file.
  827.  
  828.  If you give a file-name argument following the /Gi option, the compiler
  829.  writes the change information for all the source files into that single MDT
  830.  file. Do not put spaces between the /Gi option and the file name.
  831.  
  832.  If you specify the /Gi option without a file name, the compiler creates an
  833.  MDT file for each C source file that you give on the command line. Each MDT
  834.  file has the base name of the source file and the .MDT extension.
  835.  
  836.  Generally, when you compile with /Gi, only the changed functions in each C
  837.  source file are recompiled. The entire file is recompiled only if a change
  838.  affects the entire program.
  839.  
  840.  See Section 4.3.16 in Part 2, "Reference to QuickC Tools," for details about
  841.  incremental compilation and the /Gi option.
  842.  
  843.  
  844.  Example
  845.  
  846.    QCL /GiASC.MDT alpha.c num.c
  847.  
  848.  The example above compiles the changed portions of the files ALPHA.C and
  849.  NUM.C. It creates a single .MDT file named ASC.MDT into which it writes
  850.  change information for both source files.
  851.  
  852.  
  853.  1.4.3  Optimizing Programs
  854.  
  855.  "Optimizing" a program is the process of making the program, or a part of
  856.  the program, as fast or as small as possible. The following QCL options can
  857.  help with this process:
  858.  
  859.  
  860.  Option                            Effect
  861.  ────────────────────────────────────────────────────────────────────────────
  862.  /O, /Ot                           Optimizes the program for execution time
  863.                                    rather than code size. The compiler
  864.                                    makes the executable file faster, but it
  865.                                    does not make the file size as small as
  866.                                    possible.
  867.  
  868.  /Ol                               Optimizes loops in your program. This
  869.                                    option makes the executable file run
  870.                                    faster.
  871.  
  872.  /Gs                               Turns off stack-checking routines in
  873.                                    your program. This option reduces the
  874.                                    size of the executable file, but it may
  875.                                    cause stack-overflow errors to go
  876.                                    undetected.
  877.  
  878.  /Ox                               Performs all possible speed
  879.                                    optimizations. This option combines the
  880.                                    effects of the /Ot, /Ol, and /Gs
  881.                                    options.
  882.  
  883.  /Od                               Does not optimize your program. This
  884.                                    option speeds compilation, although it
  885.                                    may result in a slightly slower
  886.                                    executable file.
  887.  
  888.  You may combine the /O options on the command line, specifying more than one
  889.  letter following /O. For instance, /Olt optimizes loops and execution time.
  890.  If the letters conflict, QCL uses the last one in the list.
  891.  
  892.  
  893.  1.4.4  Naming Output Files
  894.  
  895.  Use the following options to name the object and executable files that QCL
  896.  creates. Note that file names must immediately follow the options, with no
  897.  intervening spaces.
  898.  
  899.  Option                            Effect
  900.  ────────────────────────────────────────────────────────────────────────────
  901.  /Foobjfile                        Gives the name objfile to the object
  902.                                    file. You can give more than one /Fo
  903.                                    option; each option applies to the next
  904.                                    C source-file name on the command line.
  905.                                    For example,
  906.  
  907.                                    QCL /FoOBJ1 SRC1.C SRC2.C
  908.  
  909.                                    compiles SRC1.C, creating an object file
  910.                                    named OBJ1.OBJ, then compiles SRC2.C,
  911.                                    creating an object file named SRC2.OBJ.
  912.  
  913.                                    If you give objfile without an extension,
  914.                                    QCL automatically appends the .OBJ
  915.                                    extension to the file name. If you give
  916.                                    a complete path name with objfile, QCL
  917.                                    creates the object file in that path.
  918.                                    For example,
  919.  
  920.                                    QCL /Fo\MODS\OBJ1.OBJ SRC1.C
  921.  
  922.                                    compiles SRC1.C, creating an object file
  923.                                    named OBJ1.OBJ in the \MODS directory.
  924.                                    If you give only a drive or directory
  925.                                    specification, the specification must
  926.                                    end with a backslash ( \ ) so that QCL
  927.                                    can distinguish it from a file name.
  928.  
  929.  /Feexefile                        Gives the name exefile to the executable
  930.                                    file. If you give exefile without an
  931.                                    extension, QCL automatically appends the
  932.                                    .EXE extension to the file name. If you
  933.                                    give a complete path name with exefile,
  934.                                    QCL creates the executable file in that
  935.                                    path. If you give a path specification
  936.                                    without a file name, the path
  937.                                    specification must end with a backslash
  938.                                    ( \ ) so that QCL can distinguish it
  939.                                    from a file name.
  940.  
  941.  If you don't tell it otherwise, QCL names output files as follows:
  942.  
  943.  Type of File                      Default
  944.  ────────────────────────────────────────────────────────────────────────────
  945.  Object                            Same base names as the original C source
  946.                                    files with extensions of .OBJ. For
  947.                                    example, if you compile a C source file
  948.                                    named LEX.C, QCL creates an object file
  949.                                    named LEX.OBJ.
  950.  
  951.  Executable                        Same base name as the first file name on
  952.                                    the command line plus an extension of
  953.                                    .EXE. For example,
  954.  
  955.                                    QCL LEX.C GENCOD.OBJ OPTIMIZ
  956.  
  957.                                    creates an executable file named LEX.EXE
  958.                                    by compiling LEX.C (creating LEX.OBJ),
  959.                                    then linking LEX.OBJ, GENCOD.OBJ, and
  960.                                    OPTIMIZ.OBJ.
  961.  
  962.  
  963.  1.4.5  Turning Off Language Extensions
  964.  
  965.  QuickC supports keywords and syntax that are additions to the standard C
  966.  language. The /Za option tells the compiler to treat such Microsoft-specific
  967.  keywords as ordinary identifiers and to display error messages if your
  968.  programs use any other extended-language features.
  969.  
  970.  Compile with the /Za option if you plan to port your programs to
  971.  environments that don't recognize Microsoft extensions to the C language, or
  972.  if you want to ensure that your programs are strictly compatible with the
  973.  ANSI (American National Standards Institute) definition of the C language.
  974.  Microsoft extensions include the _near, _far, _huge, _cdecl, _fortran, and
  975.  _pascal keywords, as well as several usages of standard C constructs that
  976.  are not defined in the ANSI standard. (See Section 4.3.35, "/Ze, /Za," in
  977.  Part 2 for more information about these extensions.)
  978.  
  979.  
  980.  1.4.6  Debugging and Syntax Checking
  981.  
  982.  Several QCL options are useful when you want the compiler to check the
  983.  syntax of your program, or when you want to track down logic errors using
  984.  the debugger built into the QuickC environment (or other Microsoft
  985.  debuggers). These options fall into three categories:
  986.  
  987.  
  988.    1.  Checking syntax
  989.  
  990.    2.  Setting warning levels
  991.  
  992.    3.  Compiling for a debugger
  993.  
  994.  
  995.  
  996.  1.4.6.1  Checking Syntax
  997.  
  998.  If you want to make sure that your program is free from syntax errors
  999.  without compiling and linking the program, compile it with the /Zs option.
  1000.  This option tells the QCL command to display error messages if your program
  1001.  has syntax errors. QCL doesn't create object or executable files.
  1002.  
  1003.  
  1004.  1.4.6.2  Setting Warning Levels
  1005.  
  1006.  You may get warning messages during compilation if your program has problems
  1007.  that aren't serious enough to stop the compiling process. You can easily
  1008.  identify a warning message because it begins with the word "warning" and has
  1009.  "C4" as the first two characters in the error number.
  1010.  
  1011.  The "warning level" options, /w and /W0 through /W4, allow you to suppress
  1012.  warning messages for certain classes of problems. In general, the lower the
  1013.  warning level, the less strict the compiler is about flagging possible
  1014.  errors in your program. You might want to use a lower warning level if
  1015.  you're intentionally using the flexibility of C in some operations and you
  1016.  want to suppress warnings about these operations.
  1017.  
  1018.  The warning-level options are described below:
  1019.  
  1020.  Option                            Effect
  1021.  ────────────────────────────────────────────────────────────────────────────
  1022.  /W0, /w                           Turns off all warning messages.
  1023.  
  1024.  /W1                               Displays severe warning messages. (This
  1025.                                    is the level of warnings you get by
  1026.                                    default.)
  1027.  
  1028.  /W2                               Displays all /W1 warnings plus warnings
  1029.                                    for problems such as functions without a
  1030.                                    declared return type, functions that
  1031.                                    have a return type other than void and
  1032.                                    don't have a return statement, and data
  1033.                                    conversions that cause loss of precision.
  1034.  
  1035.  /W3                               Displays all /W2 warnings, plus warnings
  1036.                                    for function calls that precede their
  1037.                                    function prototypes in the source code.
  1038.  
  1039.  /W4                               Displays all /W3 warnings, plus warnings
  1040.                                    for any non-ANSI constructs. The /W4
  1041.                                    option is similar to the /Za option,
  1042.                                    which gives error messages and aborts
  1043.                                    the compilation if non-ANSI features are
  1044.                                    used.
  1045.  
  1046.  /WX                               Treats all warnings as fatal errors. If
  1047.                                    there are any warning messages, the
  1048.                                    compilation aborts and no object file is
  1049.                                    produced.
  1050.  
  1051.  Appendix D lists all warning messages in order of error number. The
  1052.  description of each message indicates the warning level that must be set in
  1053.  order for the message to appear.
  1054.  
  1055.  
  1056.  1.4.6.3  Compiling for a Debugger
  1057.  
  1058.  You must compile your program with one or more of the following QCL options
  1059.  if you plan to debug it within the QuickC environment or with another
  1060.  Microsoft debugger:
  1061.  
  1062.  Option                            Effect
  1063.  ────────────────────────────────────────────────────────────────────────────
  1064.  /Zi                               Puts information needed for debugging
  1065.                                    into the program. Use /Zi if you plan to
  1066.                                    debug your program with the QuickC
  1067.                                    debugger or with the Microsoft
  1068.                                    CodeView(R) window-oriented debugger
  1069.                                    provided with other Microsoft language
  1070.                                    products.
  1071.  
  1072.  /Zd                               Puts limited symbolic information in the
  1073.                                    object file. Use /Zd if you plan to
  1074.                                    debug your program with SYMDEB, the
  1075.                                    Microsoft Symbolic Debug Utility that
  1076.                                    was shipped with earlier versions of
  1077.                                    Microsoft language products.
  1078.  
  1079.  /Zr                               Checks for null or out-of-range pointers
  1080.                                    in your program. Optional if you plan to
  1081.                                    debug with the QuickC debugger.
  1082.  
  1083.  
  1084.  1.4.7  Controlling the Preprocessor
  1085.  
  1086.  The QCL command provides several options that control the operation of the
  1087.  QuickC preprocessor. These options allow you to define macros and manifest
  1088.  (symbolic) constants from the command line, change the search path for
  1089.  include files, and stop compilation of a source file after the preprocessing
  1090.  stage to produce a preprocessed source-file listing.
  1091.  
  1092.  
  1093.  1.4.7.1  Defining Constants
  1094.  
  1095.  The C preprocessor directive #define defines a name for a constant or for C
  1096.  program text. Wherever the name appears in your program, the preprocessor
  1097.  substitutes the text you've defined for that name.
  1098.  
  1099.  You can use the /D option to define constants from the QCL command line.
  1100.  This option has the form
  1101.  
  1102.  /Didentifier=string
  1103.  
  1104.  or
  1105.  
  1106.  /Didentifier=number
  1107.  
  1108.  The identifier is the name you're defining; string or number is the text or
  1109.  numeric value that is substituted for the name. The string must be in double
  1110.  quotation marks if it includes spaces.
  1111.  
  1112.  You can leave off the equal sign and the string or number. If you do, the
  1113.  identifier is defined and its value is set to 1. You can use this format
  1114.  when you need to define an identifier but do not care what its value is. For
  1115.  example, /DCREATE defines an identifier named CREATE and sets it equal to 1.
  1116.  
  1117.  
  1118.  If you've defined a number for identifier, you can "turn off" the definition
  1119.  by using the following form of the /D option:
  1120.  
  1121.  /Didentifier=
  1122.  
  1123.  When you compile with this form, the identifier is no longer defined within
  1124.  your program and no value is substituted for it.
  1125.  
  1126.  QCL allows you to define up to 15 constants using the /D option for each
  1127.  constant. You may be able to define as many as 20, depending on the other
  1128.  options you specify. (See Section 1.4.7.4, "Removing Predefined
  1129.  Identifiers," for more information about the number of constants you are
  1130.  allowed to define.)
  1131.  
  1132.  
  1133.  1.4.7.2  Searching for Include Files
  1134.  
  1135.  The QuickC preprocessor directive
  1136.  
  1137.  #include filename
  1138.  
  1139.  tells the QuickC preprocessor to insert the contents of filename in your
  1140.  source program, beginning at the line where the directive appears. Include
  1141.  files pro-vided with Microsoft QuickC contain prototypes of standard C
  1142.  library functions and the constants used by these functions. If filename is
  1143.  enclosed in angle brackets (< >), the preprocessor looks for the file in the
  1144.  directories given by the INCLUDE environment variable. If filename is
  1145.  enclosed in quotation marks (" "), the preprocessor looks for the file first
  1146.  in the current directory and then in the directories specified by the
  1147.  INCLUDE variable. (Enter the SET command at the DOS prompt to see the
  1148.  INCLUDE variable and the directories it specifies.)
  1149.  
  1150.  Use the following options to override the usual search order without
  1151.  changing the value of the INCLUDE variable:
  1152.  
  1153.  Option                            Effect
  1154.  ────────────────────────────────────────────────────────────────────────────
  1155.  /X                                Tells the preprocessor not to search for
  1156.                                    include files in the directory given by
  1157.                                    the INCLUDE variable.
  1158.  
  1159.  /I directory                      Tells the compiler to search the given
  1160.                                    directory for include files before it
  1161.                                    searches the directories given by the
  1162.                                    INCLUDE environment variable. You can
  1163.                                    give more than one /I option, each
  1164.                                    specifying a directory. Directories are
  1165.                                    searched in the order in which they
  1166.                                    appear on the command line.
  1167.  
  1168.  
  1169.  1.4.7.3  Creating Preprocessor Listings
  1170.  
  1171.  If you want to see output from the QuickC preprocessor, give one or more of
  1172.  the following options on the QCL command line:
  1173.  
  1174.  Option                            Effect
  1175.  ────────────────────────────────────────────────────────────────────────────
  1176.  /E                                Writes preprocessor output to the
  1177.                                    standard output device (your screen,
  1178.                                    unless you redirect output to another
  1179.                                    device or to a file). The /E option also
  1180.                                    inserts #line directives in the output.
  1181.                                    The #line directives renumber the lines
  1182.                                    of the preprocessed file so that, if you
  1183.                                    recompile the preprocessed file, the
  1184.                                    errors generated during later stages of
  1185.                                    processing refer to the original source
  1186.                                    file rather than to the preprocessed
  1187.                                    file.
  1188.  
  1189.  /P                                Writes preprocessor output to a file and
  1190.                                    inserts #line directives in the output
  1191.                                    file. The preprocessor gives the file
  1192.                                    the base name of your C source file and
  1193.                                    an extension of .I.
  1194.  
  1195.  /EP                               Writes preprocessed output to the
  1196.                                    standard output device but does not
  1197.                                    insert #line directives.
  1198.  
  1199.  /C                                Leaves comments in the preprocessed
  1200.                                    output. Normally, the preprocessor
  1201.                                    strips comments from the source file.
  1202.                                    This option has an effect only if you
  1203.                                    also give the /E, /P, or /EP option.
  1204.  
  1205.  
  1206.  1.4.7.4  Removing Predefined Identifiers
  1207.  
  1208.  The QuickC compiler automatically defines certain identifiers, which
  1209.  represent conditions such as the current operating system or memory model.
  1210.  Your programs may use these identifiers along with the QuickC preprocessor
  1211.  directives #if, #ifdef, #ifndef, #else, #elif, and #endif to tell the
  1212.  compiler to "conditionally compile" portions of the program. For example,
  1213.  the #ifdef directive tells the compiler to compile subsequent code only if a
  1214.  given identifier is defined. Similarly, the #ifndef directive tells the
  1215.  compiler to compile subsequent code only if a given identifier is not
  1216.  defined. (For more information about preprocessor directives, see Chapter 7,
  1217.  "Preprocessor Directives," in C For Yourself.)
  1218.  
  1219.  The predefined identifiers are as follows: _QC, MSDOS, M_I86, M_I86mM,
  1220.  M_I8086, M_I286, NO_EXT_KEYS, and _CHAR_UNSIGNED. (For more information on
  1221.  how and when these identifiers are defined, see Table 4.5, "Predefined
  1222.  Names," in Section 4.3.31.) If you don't use these identifiers for
  1223.  conditional compilation, you might want to remove their definitions from the
  1224.  program. For each predefined identifier that you remove, you can define an
  1225.  additional identifier (over the default limit of 15) with the /D option on
  1226.  the QCL command line.
  1227.  
  1228.  The following options turn off predefined identifiers:
  1229.  
  1230.  Option                            Effect
  1231.  ────────────────────────────────────────────────────────────────────────────
  1232.  /U identifier                     Turns off the definition of identifier
  1233.  
  1234.  /u                                Turns off the definition of all
  1235.                                    predefined identifiers
  1236.  
  1237.  
  1238.  1.4.8  Compiling for Specific Hardware
  1239.  
  1240.  QuickC creates executable programs that run on any processor in the 8086
  1241.  family, including the 8086/8088, 80186, 80286, 80386, and 80486.
  1242.  
  1243.  If your programs will always run on machines with 80186 or 80286 or higher
  1244.  processors, or on machines with coprocessors, you can compile your programs
  1245.  with the following options to take advantage of the specific hardware
  1246.  configuration:
  1247.  
  1248.  Option                            Effect
  1249.  ────────────────────────────────────────────────────────────────────────────
  1250.  /G1                               Uses the 80186 instruction set for your
  1251.                                    program. You cannot run the program on
  1252.                                    machines with 8088 or 8086 processors.
  1253.  
  1254.  /G2                               Uses the 80286 instruction set for your
  1255.                                    program. You cannot run the program on
  1256.                                    machines with 8088, 8086, or 80186
  1257.                                    processors.
  1258.  
  1259.  /FPi87                            Handles math for floating-point types (
  1260.                                    float and double) by generating
  1261.                                    instructions for an 8087 or 80287 math
  1262.                                    coprocessor. This reduces the size of
  1263.                                    your program; however, the program must
  1264.                                    be run on a system with a coprocessor
  1265.                                    present.
  1266.  
  1267.  The /G2 and /FPi87 options are the most commonly used options for
  1268.  hardware-specific compilation, but others are available. See Sections 4.3.12
  1269.  and 4.3.13 for details.
  1270.  
  1271.  
  1272.  1.4.9  Choosing Memory Models
  1273.  
  1274.  The "memory model" your program uses determines how many 64K (kilobytes)
  1275.  segments the compiler allocates for its data and code. Ordinarily, you don't
  1276.  need to choose the memory model explicitly if your program's code can fit
  1277.  into one 64K segment and your program's data can fit into one 64K segment.
  1278.  This memory allocation, called the small memory model, is the default used
  1279.  by the QCL command.
  1280.  
  1281.  If your program exceeds the default limit for code or data, you must use one
  1282.  of the other memory models. The following list summarizes the options for
  1283.  the memory model:
  1284.  
  1285.  Option                            Effect
  1286.  ────────────────────────────────────────────────────────────────────────────
  1287.  /AT                               Tiny model: provides one 64K segment for
  1288.                                    both data and code. The compiler
  1289.                                    produces a .COM file instead of a .EXE
  1290.                                    file.
  1291.  
  1292.  /AS                               Small model: provides one 64K segment
  1293.                                    for data and one 64K segment for code.
  1294.                                    No one data item can exceed 64K. This is
  1295.                                    the most efficient model for QuickC
  1296.                                    programs. QCL uses this option
  1297.                                    automatically if you don't give a
  1298.                                    memory-model option, so you never need
  1299.                                    to give this option explicitly.
  1300.  
  1301.  /AM                               Medium model: provides one 64K segment
  1302.                                    for data and multiple 64K segments for
  1303.                                    code. No one data item can exceed 64K.
  1304.                                    This is the most efficient model if your
  1305.                                    program exceeds the 64K default limit
  1306.                                    for code.
  1307.  
  1308.  /AC                               Compact model: provides multiple 64K
  1309.                                    segments for data and one 64K segment
  1310.                                    for code. No one data item can exceed
  1311.                                    64K. This is the most efficient model if
  1312.                                    your program exceeds the 64K default
  1313.                                    limit for data.
  1314.  
  1315.  /AL                               Large model: provides multiple 64K
  1316.                                    segments for data and for code. No one
  1317.                                    data item can exceed 64K.
  1318.  
  1319.  /AH                               Huge model: same as large model, except
  1320.                                    that individual data items can be larger
  1321.                                    than 64K.
  1322.  
  1323.  Although memory models give you additional flexibility in dealing with large
  1324.  programs, you must use them with care to avoid problems in your programs.
  1325.  See Section 4.3.1 or Appendix B for further information about the use of
  1326.  memory models.
  1327.  
  1328.  
  1329.  1.4.10  Controlling the Linking Process
  1330.  
  1331.  Several QCL options control the linking process rather than the compiling
  1332.  process. You've already encountered one of these options: the /Fe option,
  1333.  which renames the executable file. Here are the others:
  1334.  
  1335.  Option                            Effect
  1336.  ────────────────────────────────────────────────────────────────────────────
  1337.  /Fm «mapfile»                     Creates a map file showing program
  1338.                                    segments in order of appearance in the
  1339.                                    program. If you give mapfile without an
  1340.                                    extension, QCL automatically appends the
  1341.                                    .MAP extension to the file name. If you
  1342.                                    give a complete path name with mapfile,
  1343.                                    QCL creates the map file in that path.
  1344.                                    For example,
  1345.  
  1346.                                    QCL /Fm\MODS\MAP1.MAP SRC1.C
  1347.  
  1348.                                    compiles and links SRC1.C, creating a
  1349.                                    map file named MAP1.MAP in the \MODS
  1350.                                    directory. If the path specification
  1351.                                    lacks a file name, it must end with a
  1352.                                    backslash ( \ ) to distinguish it from a
  1353.                                    file name.
  1354.  
  1355.                                    The mapfile argument is optional; if you
  1356.                                    don't specify a new name, the linker
  1357.                                    gives the map file the same base name as
  1358.                                    the executable file, with an extension
  1359.                                    of .MAP. For example,
  1360.  
  1361.                                    QCL /Fm  MOD1.C MOD2.C
  1362.  
  1363.                                    creates an executable file named
  1364.                                    MOD1.EXE and a map file named MOD1.MAP.
  1365.  
  1366.  /F number                         Sets the stack size to the given number
  1367.                                    of bytes. The number may be in decimal,
  1368.                                    octal, or hexadecimal. (As in C programs,
  1369.                                    octal numbers start with the prefix 0
  1370.                                    and hexadecimal numbers with the prefix
  1371.                                    0x.) If you don't give this option, the
  1372.                                    executable file uses a 2K stack. Use
  1373.                                    this option if your program gets
  1374.                                    stack-overflow errors at run time.
  1375.  
  1376.  See Sections 4.3.8 - 4.3.10 for detailed information on these options and on
  1377.  map files.
  1378.  
  1379.   The /link option
  1380.  
  1381.  Another way of controlling the linking process is to use the /link option on
  1382.  the QCL command line. The /link option allows you to specify QLINK command
  1383.  options─not QCL options─without invoking the linker separately. On the QCL
  1384.  command line, the /link option must follow the source and object files and
  1385.  all QCL options. QCL passes directly to the linker the options that follow
  1386.  /link. These options are described in Section 1.5.2, as well as in Section
  1387.  5.4.
  1388.  
  1389.  
  1390.  Example
  1391.  
  1392.    QCL /FPi87 /Fm SRC1.C SRC2 /link /INF
  1393.  
  1394.  In the example, the /Fm and /FPi87 options apply to the QCL command and the
  1395.  /INF option applies only to the linker. As a result of this command line,
  1396.  QCL compiles SRC1.C to run on an 8087 or 80287 processor, then passes
  1397.  SRC1.OBJ and SRC2.OBJ to the linker. The /Fm option to QCL causes the linker
  1398.  to create a map file named SRC1.MAP. The /INF option, which applies only to
  1399.  the linker and not to QCL, causes the linker to display information about
  1400.  the linking process.
  1401.  
  1402.  
  1403.  1.4.11  Other QCL Options
  1404.  
  1405.  QCL supports a large number of options besides the ones already described,
  1406.  which control all aspects of the compilation process. Some of the more
  1407.  commonly used options are described below:
  1408.  
  1409.  Option                            Effect
  1410.  ────────────────────────────────────────────────────────────────────────────
  1411.  /Gc                               Calling-convention option. Uses the
  1412.                                    FORTRAN/Pascal naming and calling
  1413.                                    conventions for functions in the program.
  1414.                                    Compile with this option if you want to
  1415.                                    call routines that use the Microsoft
  1416.                                    Pascal or Microsoft FORTRAN calling
  1417.                                    conventions or if you need to save space
  1418.                                    in the executable file. (See Section
  1419.                                    4.3.14 for more information about the
  1420.                                    effects of this option.)
  1421.  
  1422.  /Gt«number»                       Threshold option. Tells the compiler to
  1423.                                    allocate data items larger than number
  1424.                                    in a new data segment. If you give this
  1425.                                    option with no number, QCL allocates
  1426.                                    items larger than 256 bytes in their own
  1427.                                    segment. If you don't give this option,
  1428.                                    QCL allocates items larger than 32,767
  1429.                                    bytes in their own segment.
  1430.  
  1431.                                    This option applies if you compile with
  1432.                                    the compact (/AC), large (/AL), or huge
  1433.                                    (/AH) memory model. See Appendix B for
  1434.                                    more information about memory models and
  1435.                                    allocation.
  1436.  
  1437.  /NTtextsegname                    Name-text-segment option. Assigns the
  1438.                                    given name to the text segment. The
  1439.                                    space is optional between /NT and
  1440.                                    textsegname. The text segment contains
  1441.                                    the program code for the entire program
  1442.                                    (if you compile with the /AS option, the
  1443.                                    /AT option, the /AC option, or no
  1444.                                    memory-model option) or for the module
  1445.                                    you are compiling (if you compile with
  1446.                                    the /AM, /AL, or /AH option).
  1447.  
  1448.  /Zl                               Library options. Tells the compiler not
  1449.                                    to put the name of the appropriate
  1450.                                    combined library in the object file. Use
  1451.                                    this option to compile modules that you
  1452.                                    want to put in a library with the LIB
  1453.                                    utility.
  1454.  
  1455.  /Zp«number»                       Pack option. Stores structure members
  1456.                                    after the first on number-byte
  1457.                                    boundaries. The number argument, if
  1458.                                    given, may be 1, 2, or 4; if it isn't
  1459.                                    given, QCL assumes a value of 2. This
  1460.                                    option may reduce the size of executable
  1461.                                    files, although it may also slow program
  1462.                                    execution.
  1463.  
  1464.  See Section 4.3 for descriptions of all the QCL options.
  1465.  
  1466.  
  1467.  1.5  Invoking the Linker Directly: The QLINK Command
  1468.  
  1469.  If you are building a large program composed of many source files, you may
  1470.  prefer to compile the source files in one step, and then link the resulting
  1471.  object files in a separate step. For example, in the first step, you would
  1472.  compile your C source files as shown below:
  1473.  
  1474.    QCL /c SOURCE1.C SOURCE2.C
  1475.  
  1476.  Then, in the second step, you would link the resulting object files, plus
  1477.  any additional object files or libraries, as shown below:
  1478.  
  1479.    QCL SOURCE1 SOURCE2 GRAPHICS.LIB
  1480.  
  1481.  As illustrated in the second step, if you give only object files or
  1482.  libraries on the QCL command line, the QCL command simply passes the object
  1483.  files and libraries to the linker.
  1484.  
  1485.  Instead of using the QCL command to link, you can invoke the linker directly
  1486.  by entering the QLINK command. Because the linker prompts you for any input
  1487.  it needs, using QLINK makes it easier to specify file names and options; you
  1488.  don't need to enter everything on the command line, although you may do so
  1489.  if you wish.
  1490.  
  1491.  The remainder of this section explains how to use the QLINK command to link
  1492.  object files and libraries.
  1493.  
  1494.  
  1495.  1.5.1  Giving Input to the QLINK Command
  1496.  
  1497.  The simplest way to invoke the linker directly is to give the command
  1498.  
  1499.    QLINK
  1500.  
  1501.  If you don't give any other information on the command line, QLINK prompts
  1502.  you for input. The following list shows how to respond to each prompt:
  1503.  
  1504.  Prompt                            Response
  1505.  ────────────────────────────────────────────────────────────────────────────
  1506.  Object Modules:                   The names of all object files that you
  1507.                                    want to link, separated by plus signs.
  1508.                                    If all the names do not fit on one line,
  1509.                                    type a plus sign as the last character
  1510.                                    on the line. QLINK repeats the prompt on
  1511.                                    the next line, and you can type
  1512.                                    additional object-file names.
  1513.  
  1514.                                    Type a library name in response to this
  1515.                                    prompt if you want to include the entire
  1516.                                    library in the executable file. Make
  1517.                                    sure the library name has an extension
  1518.                                    of .LIB. (If you type the library name
  1519.                                    in response to the "Libraries:" prompt
  1520.                                    below, QLINK places in the executable
  1521.                                    file only the library modules that are
  1522.                                    called in your source files.)
  1523.  
  1524.  Run File:                         The name of the executable file that you
  1525.                                    want to create. If you press ENTER
  1526.                                    without typing a name, QLINK uses the
  1527.                                    base name of the first object file you
  1528.                                    gave plus the extension .EXE. This name
  1529.                                    is shown in brackets in the prompt.
  1530.  
  1531.  List File:                        The name of the map file, which shows
  1532.                                    segments in your program. If you press
  1533.                                    ENTER without typing a name, QLINK
  1534.                                    doesn't create a map file. If you enter
  1535.                                    a name without an extension, QLINK adds
  1536.                                    the .MAP extension automatically.
  1537.  
  1538.  Libraries:                        The names of libraries other than the
  1539.                                    standard combined libraries that you
  1540.                                    want to link with the object files. If
  1541.                                    you enter a library name without an
  1542.                                    extension, QLINK assumes the extension
  1543.                                    .LIB. If you enter more than one library
  1544.                                    name, put a plus sign between each
  1545.                                    library name and the next.
  1546.  
  1547.  You can supply linker options as part of the response to any prompt. See
  1548.  Section 1.5.2, "QLINK Options," for a list of commonly used options.
  1549.  
  1550.   Input on the command line
  1551.  
  1552.  If you prefer, you can give all your input to QLINK on the command line. The
  1553.  QLINK command line has the form shown below:
  1554.  
  1555.  (This figure may be found in the printed book.)
  1556.  
  1557.  Commas must appear as shown above to separate the names of the different
  1558.  files. You may type a semicolon to terminate the command line anywhere after
  1559.  the list of object files. The semicolon tells QLINK to use defaults for the
  1560.  remaining files. QLINK options may appear anywhere on the command line.
  1561.  
  1562.  The prompts previously described correspond to the command line as follows:
  1563.  "Object Modules" is equivalent to objfiles, "Run File" to exefile, "List
  1564.  File" to mapfile, and "Libraries" to libraries.
  1565.  
  1566.   Input in a response file
  1567.  
  1568.  QLINK allows you one other alternative for providing input. You can enter
  1569.  responses for all prompts in a file, then invoke QLINK with the following
  1570.  command:
  1571.  
  1572.    QLINK @responsefile
  1573.  
  1574.  Replace responsefile with the name of the file that contains your responses.
  1575.  The responses should look the same as if you were typing them in response to
  1576.  prompts. For example, type all object-file names on the first line, the
  1577.  executable-file name on the second line, and the map-file name on the third
  1578.  line. Use a plus sign at the end of a line to continue a response on the
  1579.  next line. Leave a blank line in the file if you want QLINK to use the
  1580.  default for a prompt. Place QLINK options at the end of any response or
  1581.  place them on one or more separate lines.
  1582.  
  1583.  
  1584.  1.5.2  QLINK Options
  1585.  
  1586.  QLINK options allow you to control the operation of the linker. If you're
  1587.  using the QCL command to link, give these options after the /link option on
  1588.  the command line. If you're using the QLINK command to link, these options
  1589.  may appear anywhere on the command line. QLINK options must be preceded by a
  1590.  slash.
  1591.  
  1592.  Not all QLINK options are applicable to QuickC programs. Some options are
  1593.  useful only for assembly-language programs. This section describes only the
  1594.  options that are useful for QuickC programs. See Chapter 5, "QLINK," for a
  1595.  complete list of options.
  1596.  
  1597.   Case sensitivity
  1598.  
  1599.  QLINK options are not case sensitive, so you can type any combination of
  1600.  uppercase and lowercase letters for each option.
  1601.  
  1602.   Abbreviations
  1603.  
  1604.  Because some QLINK options have long names, QLINK allows you to abbreviate
  1605.  each name. The abbreviation must include enough continuous letters to
  1606.  distinguish the option from others. Letters that you can leave off are
  1607.  surrounded by brackets in the following sections. In general, this book
  1608.  refers to QLINK options by their shortest possible abbreviations.
  1609.  
  1610.   Numerical parameters
  1611.  
  1612.  Some QLINK options take numbers as parameters. You may specify the numbers
  1613.  in decimal, hexadecimal, or octal. As in C programs, hexadecimal numbers are
  1614.  identified by the prefix 0x and octal numbers by the prefix 0.
  1615.  
  1616.   Help with QLINK options
  1617.  
  1618.  If you need help with QLINK options, use the following command:
  1619.  
  1620.    QLINK /help
  1621.  
  1622.  The linker responds by displaying a list of all the available options.
  1623.  
  1624.  
  1625.  1.5.2.1  Controlling the Linking Process with Options
  1626.  
  1627.  Use the QLINK options described below to control the linking process:
  1628.  
  1629.  Option                            Effect
  1630.  ────────────────────────────────────────────────────────────────────────────
  1631.  /BA«TCH»                          Tells the linker to continue processing
  1632.                                    if it can't find one of the files you've
  1633.                                    given, rather than stop processing and
  1634.                                    prompt you. Also prevents QLINK from
  1635.                                    displaying its program banner and
  1636.                                    echoing the contents of response files
  1637.                                    on standard output.
  1638.  
  1639.                                    Use this option in batch files or NMAKE
  1640.                                    description files if you're building
  1641.                                    large executable files and don't want
  1642.                                    the linker to stop processing if it
  1643.                                    can't find a file it needs.
  1644.  
  1645.  /INC«REMENTAL»                    Prepares the program for subsequent
  1646.                                    incremental linking, which links only
  1647.                                    the object files that have changed since
  1648.                                    the last link. This is significantly
  1649.                                    faster than regular linking. The /PADC
  1650.                                    and /PADD options, used for padding code
  1651.                                    and data, should also be specified when
  1652.                                    you use this option. This option is
  1653.                                    incompatible with the tiny memory model
  1654.                                    and with the /E (Pack .EXE file) option.
  1655.  
  1656.  
  1657.  /INF«ORMATION»                    Tells the linker to display information
  1658.                                    about the linking process, including the
  1659.                                    linking phase and the name of each
  1660.                                    object file being linked.
  1661.  
  1662.  /M«AP»                            Includes a full public-symbol listing in
  1663.                                    the map file.
  1664.  
  1665.  /NOD«EFAULTLIBRARYSEARCH» «:      Tells the linker not to search the
  1666.  filename»                         standard C combined libraries to find C
  1667.                                    library functions. If you use this
  1668.                                    option, you should explicitly specify
  1669.                                    the name of a standard combined library.
  1670.  
  1671.  
  1672.  /PAU«SE»                          Tells the linker to pause before it
  1673.                                    creates the executable file and to
  1674.                                    display a message. This allows you to
  1675.                                    insert a new disk to hold the executable
  1676.                                    file.
  1677.  
  1678.                                    If you're running on a machine without a
  1679.                                    hard disk, you might want to create the
  1680.                                    executable file on a different removable
  1681.                                    disk. In this case, you would swap the
  1682.                                    current disk for the new disk before
  1683.                                    creating the executable file. If QLINK
  1684.                                    displays the message
  1685.  
  1686.                                    Temporary file  tempfile  has been
  1687.                                    created.
  1688.  
  1689.                                    Do not change diskette in drive  letter.
  1690.  
  1691.                                    you should terminate your link session,
  1692.                                    copy the temporary file named tempfile
  1693.                                    to the disk where you want to create the
  1694.                                    executable file, and enter the QLINK
  1695.                                    command again.
  1696.  
  1697.  
  1698.  1.5.2.2  Optimizing the Executable File
  1699.  
  1700.  The following QLINK options make the executable file faster, smaller, or
  1701.  both:
  1702.  
  1703.  Option                            Effect
  1704.  ────────────────────────────────────────────────────────────────────────────
  1705.  /E«XEPACK»                        Compresses the executable file. This
  1706.                                    option reduces the program's size and
  1707.                                    load time. However, you cannot use the
  1708.                                    QuickC or CodeView debugger to debug the
  1709.                                    program.
  1710.  
  1711.  /F«ARCALLTRANSLATION»             Reduces the size of the executable file
  1712.                                    and increases its speed by optimizing
  1713.                                    far calls to procedures in the same
  1714.                                    segment as the calling procedure.
  1715.  
  1716.  /PACKC«ODE»«:number»              Given with the /F option, improves the
  1717.                                    efficiency of medium-, large-, and
  1718.                                    huge-model programs by grouping
  1719.                                    neighboring code segments.
  1720.  
  1721.  /PACKD«ATA»«:number»              Improves the efficiency of compact- and
  1722.                                    large-model programs by grouping
  1723.                                    neighboring data segments.
  1724.  
  1725.  
  1726.  1.5.2.3  Modifying the Executable File
  1727.  
  1728.  You can use the following QLINK options to modify the executable file (for
  1729.  example, to specify the maximum number of segments or set the stack size):
  1730.  
  1731.  Option                            Effect
  1732.  ────────────────────────────────────────────────────────────────────────────
  1733.  /CP«ARMAXALLOC»:number            Sets the maximum number of 16-byte
  1734.                                    paragraphs needed by the program to
  1735.                                    number. The number may be any decimal,
  1736.                                    octal, or hexadecimal number in the
  1737.                                    range 1- 65,535 decimal.
  1738.  
  1739.  /SE«GMENTS»:number                Sets the maximum number of segments a
  1740.                                    program can have to number. The number
  1741.                                    may be any value in the range 1-3,072
  1742.                                    decimal. If you don't give this option,
  1743.                                    a program may have no more than 128
  1744.                                    segments.
  1745.  
  1746.  /ST«ACK»:number                   Sets the stack size to number bytes. The
  1747.                                     number may be any decimal, octal, or
  1748.                                    hexadecimal number in
  1749.                                    the range 1- 65,535 decimal. If
  1750.                                    you don't give this option, the stack
  1751.                                    is 2K.
  1752.  
  1753.  
  1754.  1.5.2.4  Other QLINK Options
  1755.  
  1756.  The QLINK options described in this chapter are those most typically used
  1757.  when linking QuickC programs. The linker supports additional options,
  1758.  including several that apply only to assembly-language programs. For
  1759.  complete information on all QLINK options, see Chapter 5, "QLINK," in Part 2
  1760.  of this manual.
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  Chapter 2  Maintaining Software Libraries with LIB
  1768.  ────────────────────────────────────────────────────────────────────────────
  1769.  
  1770.  The Microsoft Library Manager (LIB) lets you create and maintain object-code
  1771.  libraries. You can use the library manager to
  1772.  
  1773.  
  1774.    ■   List the contents of a library
  1775.  
  1776.    ■   Modify the contents of an existing library
  1777.  
  1778.    ■   Copy object code from the library
  1779.  
  1780.    ■   Create a new library
  1781.  
  1782.  
  1783.  This chapter gives you an introduction to libraries and then explains how to
  1784.  perform each of the tasks listed above.
  1785.  
  1786.  
  1787.  2.1  Why Use a Library?
  1788.  
  1789.      Object modules
  1790.  
  1791.  An "object-code library" is an organized collection of object code; that is,
  1792.  a library contains functions and data that are already assembled or compiled
  1793.  and are ready for linking. The structure of a library supports the mass
  1794.  storage of common procedures─procedures called by a variety of programs.
  1795.  Each library consists of components. These components, called "object
  1796.  modules" (or sometimes just "modules"), can be added, deleted, changed, or
  1797.  copied. When you give the linker a library as input, the linker efficiently
  1798.  scans the library and uses only the modules needed by the program.
  1799.  
  1800.  Object-code libraries are typically used for one of three purposes:
  1801.  
  1802.  
  1803.    1.  To support high-level languages. Languages, including C, BASIC, and
  1804.        FORTRAN, perform input/output and floating-point operations by calling
  1805.        standard support routines. Because the support routines are available
  1806.        in a  library, the compiler never needs to regenerate code for these
  1807.        routines. Libraries that contain standard support routines are called
  1808.        "standard libraries."
  1809.  
  1810.    2.  To perform complex and specialized activities, such as data-base
  1811.        management or advanced graphics. Libraries containing such routines
  1812.        are often sold by third-party software vendors or are provided by the
  1813.        makers of the compiler (in the case of graphics libraries for the
  1814.        Microsoft QuickC Compiler).
  1815.  
  1816.    3.  To support your own work. If you have created routines that you find
  1817.        useful for a variety of programs, you may want to put these routines
  1818.        in a library. That way, these routines do not need to be recoded or
  1819.        recompiled. You save development time by using work you have already
  1820.        done.
  1821.  
  1822.  
  1823.  
  1824.  2.2  The LIB Command
  1825.  
  1826.  The LIB command has the form shown below:
  1827.  
  1828.  (Please refer to the printed book.)
  1829.  
  1830.  (This figure may be found in the printed book.)
  1831.  
  1832.  The items in italics are different pieces of input (described below) that
  1833.  you must give on the LIB command line:
  1834.  
  1835.  
  1836.    ■   The oldlibrary field gives the name of a library. Object-code
  1837.        libraries typically have names that end with .LIB. You specify a
  1838.        library in this field whenever you use LIB.
  1839.  
  1840.    ■   The options field specifies one or more LIB options. For most tasks,
  1841.        you won't need to use any of these options. The options are described
  1842.        in Chapter 6, "LIB," in Part 2 of this manual.
  1843.  
  1844.    ■   The commands field gives the commands that modify the contents of the
  1845.        library. Commands are described in Section 2.4, "Modifying the
  1846.        Contents of a Library."
  1847.  
  1848.    ■   The listfile field specifies a file into which LIB puts a list of the
  1849.        library's contents. The next section tells how to list the contents of
  1850.        a library.
  1851.  
  1852.    ■   The newlibrary field specifies a name for the modified library if the
  1853.        commands you give change an existing library. See Section 6.1.1.5,
  1854.        "Output Library," for more information on this field.
  1855.  
  1856.  
  1857.  
  1858.  2.3  Listing the Contents of a Library
  1859.  
  1860.  You can use LIB to obtain a symbol listing for any object-code library.
  1861.  Listings are useful because they give the exact names of modules and of
  1862.  "public symbols," which are names of functions and global variables that can
  1863.  be referenced throughout the program. You may need a listing if you want to
  1864.  modify a library, as described in the next section.
  1865.  
  1866.  To list the contents of a library, you need to use only the oldlibrary field
  1867.  and the listfile field. Use a semicolon (;) to terminate the command so that
  1868.  LIB does not prompt you for additional input.
  1869.  
  1870.  In the oldlibrary field, give the name of the library you want to examine.
  1871.  You can enter a full path name or a file name without a path. If you do not
  1872.  include a file extension, LIB assumes the default .LIB extension. Typically,
  1873.  object-code libraries have a .LIB extension.
  1874.  
  1875.  In the listfile field, give the name of the file in which you want the
  1876.  listing to be placed. If you enter the name of a file that does not yet
  1877.  exist, LIB creates the file. If you enter the name of a file that already
  1878.  exists, LIB replaces the current contents of the file with the new listing.
  1879.  
  1880.  
  1881.  For example, the following command line directs LIB to place a listing of
  1882.  the contents of MYLIB.LIB into the file LISTING.TXT:
  1883.  
  1884.    LIB MYLIB, LISTING.TXT;
  1885.  
  1886.  The listing file summarizes the contents of the entire library. Each listing
  1887.  file contains two kinds of information, in this order:
  1888.  
  1889.  
  1890.    1.  A list of public symbols with corresponding modules for each
  1891.  
  1892.    2.  A list of modules with corresponding symbols for each
  1893.  
  1894.  
  1895.  Modules, which are basic to the operation of LIB, are discussed in the next
  1896.  section. For a more detailed description of listing files, see Section
  1897.  6.1.1.4, "Cross-Reference-Listing File," in Part 2 of this manual.
  1898.  
  1899.  
  1900.  2.4  Modifying the Contents of a Library
  1901.  
  1902.  You can use LIB to alter the contents of any object-code library. There are
  1903.  a number of reasons why you might want to do so. For example, if you work
  1904.  with higher-level-language libraries, you may want to replace a standard
  1905.  routine with
  1906.  
  1907.  your own version of the routine. Or you may want to add a new routine to the
  1908.  standard library so your routine is available along with the standard
  1909.  routines.
  1910.  
  1911.  LIB operations involve "object files" and object modules:
  1912.  
  1913.  Item                              Description
  1914.  ────────────────────────────────────────────────────────────────────────────
  1915.  Object file                       An independent file containing object
  1916.                                    code corresponding to one source file.
  1917.                                    An object file normally has a .OBJ file
  1918.                                    extension.
  1919.  
  1920.  Object module                     A self-contained unit within a library,
  1921.                                    consisting of one or more routines. An
  1922.                                    object module in a library is in almost
  1923.                                    all respects identical to the
  1924.                                    corresponding object file. The object
  1925.                                    module, however, has no file extension
  1926.                                    or path because it is not a separate
  1927.                                    file.
  1928.  
  1929.  The sections that follow discuss both items extensively. Remember: a unit of
  1930.  object code in a library is called an object module; the corresponding unit
  1931.  of code outside a library is stored in a file called an object file.
  1932.  
  1933.  
  1934.  2.4.1  Modifying the Library
  1935.  
  1936.  To modify an object-code library, carry out the following steps:
  1937.  
  1938.  
  1939.    1.  To add or replace an object module, first compile or assemble the new
  1940.        code. If the procedure you want to add is part of a program, copy the
  1941.        source code into its own file and compile or assemble it separately.
  1942.  
  1943.    2.  Add, delete, or replace the module with the command line
  1944.  
  1945.        LIB oldlibrary commands;
  1946.  
  1947.        in which commands consists of one or more LIB commands that use the
  1948.        syntax shown later in this section.
  1949.  
  1950.  
  1951.  Note that in step 2 above, the command line does not use all the LIB fields.
  1952.  You can, however, include a listfile if you want a file listing. You can
  1953.  also use the newlibrary field to preserve old library contents. If you enter
  1954.  a newlibrary, LIB places the updated library contents in newlibrary and
  1955.  leaves the contents of oldlibrary unchanged. Otherwise, LIB updates the
  1956.  contents of oldlibrary and saves the old contents in the file
  1957.  oldlibrary.BAK.
  1958.  
  1959.  You can use the library as input to the linker once the contents change. Any
  1960.  routines you have added or replaced become part of the library and can be
  1961.  called by your programs.
  1962.  
  1963.  
  1964.  2.4.2  Adding a Module
  1965.  
  1966.  To add an object file to a library, use the command
  1967.  
  1968.  +file
  1969.  
  1970.  in which file is the name of the object file you want to add as a module.
  1971.  You can specify a complete path name for file if the object file is not in
  1972.  the current directory. If the file-name extension is .OBJ, you can leave off
  1973.  the extension; LIB assumes the .OBJ extension by default. LIB adds the
  1974.  object module at the end of the library. The library contains only the base
  1975.  name of the module without the .OBJ extension.
  1976.  
  1977.  For example, the following command line adds the module PRINTOUT to the
  1978.  library MYLIB.LIB, by copying the contents of the object file
  1979.  \SOURCE\PRINTOUT.OBJ:
  1980.  
  1981.    LIB MYLIB +\SOURCE\PRINTOUT;
  1982.  
  1983.  You can also add the entire contents of one library to another by specifying
  1984.  a library name for file. Remember to enter a complete file name (including
  1985.  extension) because LIB assumes that files in the commands field have the
  1986.  .OBJ extension. For example, the following command line adds the complete
  1987.  contents of the library SMALL.LIB to the library SUPER.LIB:
  1988.  
  1989.    LIB SUPER +SMALL.LIB;
  1990.  
  1991.  
  1992.  2.4.3  Deleting a Module
  1993.  
  1994.  To delete an object module from a library, use the command
  1995.  
  1996.  -module
  1997.  
  1998.  in which module is the name of a module already stored in the library. For
  1999.  example, the following command deletes the module DELETEME from the library
  2000.  BIGLIB.LIB:
  2001.  
  2002.    LIB BIGLIB -DELETEME;
  2003.  
  2004.  
  2005.  2.4.4  Replacing a Module
  2006.  
  2007.  To replace an object module within a library, use the command
  2008.  
  2009.  - +module
  2010.  
  2011.  in which module is the name of a module that is currently stored in the
  2012.  library. The old copy of module is deleted from the library. The current
  2013.  contents of  module.OBJ are copied into the library. For example, to replace
  2014.  the QuickC small-model library version of printf() with your own version,
  2015.  execute these steps:
  2016.  
  2017.  
  2018.    1.  Write your own version of printf(), and compile or assemble it.
  2019.  
  2020.    2.  Make sure that the resulting object file is named PRINTF.OBJ and that
  2021.        PRINTF.OBJ is located in the current directory. (If you look at a
  2022.        listing of the library, you will see that the public symbol for the
  2023.        printf() function is _printf(). The name of the module, however, is
  2024.        printf(). If you have any doubt about the exact name of an object
  2025.        module, get a listing of the library before trying to modify the
  2026.        library.)
  2027.  
  2028.    3.  Issue the following command line:
  2029.  
  2030.        LIB SLIBCE -+PRINTF;
  2031.  
  2032.  
  2033.  
  2034.  You can combine any number of operations in the commands field. Spaces
  2035.  between the commands are acceptable but not necessary. For example, the
  2036.  following command line adds a new module (NEWFUN), replaces a current module
  2037.  (OLDFUN), and deletes another current module (BYENOW):
  2038.  
  2039.    LIB MYLIB +NEWFUN -+OLDFUN -BYENOW;
  2040.  
  2041.  In the example above, the files NEWFUN.OBJ and OLDFUN.OBJ serve as input for
  2042.  the modules NEWFUN and OLDFUN, respectively.
  2043.  
  2044.  
  2045.  2.4.5  Copying and Moving Modules from a Library
  2046.  
  2047.  You can extract any object module from a library. The extracted object
  2048.  module is copied into a .OBJ file with the same name as the module. For
  2049.  example, if you extract a module named OLDFUN, LIB copies it into the object
  2050.  file named OLDFUN.OBJ. If a file with that name already exists, its contents
  2051.  are overwritten.
  2052.  
  2053.  To copy a module into a .OBJ file, use the command
  2054.  
  2055.  *module
  2056.  
  2057.  in which module is the name of the module you wish to copy from the library.
  2058.  The module is placed in the file module.OBJ.
  2059.  
  2060.  For example, the following command line copies the printf() module from the
  2061.  Microsoft QuickC small-model library and places the contents of this module
  2062.  into the object file PRINTF.OBJ:
  2063.  
  2064.    LIB SLIBCE *PRINTF;
  2065.  
  2066.  You can move a module out of a library with the following command:
  2067.  
  2068.  -*module
  2069.  
  2070.  Moving a module is similar to copying a module, in that LIB copies the
  2071.  contents of the module into a file named module.OBJ. The move command (-*),
  2072.  however, deletes the module from the library after copying it.
  2073.  
  2074.  
  2075.  2.5  Creating a New Library
  2076.  
  2077.  When you use LIB, creating a new object-code library is easy. You simply
  2078.  combine two techniques:
  2079.  
  2080.  
  2081.    1.  In the oldlibrary field, enter the name of a file that does not yet
  2082.        exist.
  2083.  
  2084.    2.  In the command field, use the add command (+file) to list entries for
  2085.        the new library. (Technically, this step is not required; however, if
  2086.        you do not use the add command, the library will be empty.)
  2087.  
  2088.  
  2089.  For example, if the file NEWLIB.LIB does not yet exist, the following
  2090.  command line creates this file:
  2091.  
  2092.    LIB NEWLIB +MYPROC +MYFUN +PRINTIT;
  2093.  
  2094.  The object files MYPROC, MYFUN, and PRINTIT provide the input for the new
  2095.  library.
  2096.  
  2097.  
  2098.  2.6  Other Ways of Using LIB
  2099.  
  2100.  This chapter has covered the basic operations of the LIB utility so that you
  2101.  can quickly begin to create and maintain your own libraries. For a complete
  2102.  description of LIB, see Chapter 6, "LIB," in Part 2 of this manual. Some
  2103.  additional features described in that chapter include the following:
  2104.  
  2105.  
  2106.    ■   How to make LIB case sensitive so that it treats Print and PRINT as
  2107.        two different module names.
  2108.  
  2109.    ■   How to specify alignment of modules within a library.
  2110.  
  2111.    ■   How to let LIB prompt you for command fields, rather than requiring
  2112.        you to enter them all on a single command line.
  2113.  
  2114.    ■   How to use a response file to give input to LIB. Response files are
  2115.        useful for giving unusually long command lines or for giving the same
  2116.        command line repeatedly.
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  Chapter 3  Maintaining Programs with NMAKE
  2125.  ────────────────────────────────────────────────────────────────────────────
  2126.  
  2127.  The Microsoft Program-Maintenance Utility (NMAKE) helps to automate software
  2128.  development and maintenance. Following instructions that you supply, NMAKE
  2129.  determines whether a program is out-of-date and, if so, how to update it.
  2130.  Your instructions list all the sources, include files, and libraries the
  2131.  program depends on and specify the commands to update the program.
  2132.  
  2133.  NMAKE, however, is not limited to updating programs. It can also perform
  2134.  other actions, such as building distribution disks, cleaning up directories,
  2135.  and so forth. Any procedure that requires the latest version of several
  2136.  files is a good candidate for NMAKE. By using NMAKE for these operations
  2137.  instead of performing them manually, you can avoid the headaches of invalid
  2138.  source modules, old libraries, and forgotten include files.
  2139.  
  2140.  You can use NMAKE in the following situations:
  2141.  
  2142.  
  2143.    ■   In program development, to update an executable file whenever any of
  2144.        the source or object files has changed
  2145.  
  2146.    ■   In library management, to rebuild a library whenever any of the
  2147.        modules in the library has changed
  2148.  
  2149.    ■   In a networking environment, to update the local copy of a file that
  2150.        is stored on the network whenever the master copy has changed
  2151.  
  2152.  
  2153.  This chapter describes what NMAKE does, defines the terms you need to
  2154.  understand, and tells you how to use NMAKE to manage your QuickC Compiler
  2155.  projects. For detailed information, see Chapter 7, "NMAKE," in Part 2 of
  2156.  this manual.
  2157.  
  2158.  
  2159.  3.1  How NMAKE Works
  2160.  
  2161.  NMAKE relies on a "description file" (sometimes called a "makefile") to
  2162.  determine which files to update, when to update them, and what operations to
  2163.  perform. The description file for a QuickC program lists the source and
  2164.  header files needed to build each object file, and all the object files
  2165.  needed to build the executable program. The description file tells NMAKE
  2166.  whether changes have been made to source, header, or object files. If source
  2167.  or header files have been changed, NMAKE recompiles the object file; if any
  2168.  object files have been changed, NMAKE relinks the program. The description
  2169.  file also contains the QCL commands that must be executed to build the
  2170.  object files and the program.
  2171.  
  2172.  Description files are made of several elements:
  2173.  
  2174.  
  2175.    ■   Description blocks, which tell NMAKE how to build files. See Section
  2176.        3.2.1, "Description Blocks," for further information.
  2177.  
  2178.    ■   Macros, similar to C macros, which provide a shorthand notation that
  2179.        allows you to change certain values when the file is processed. See
  2180.        Section 3.5.2, "Using Macros," for further information.
  2181.  
  2182.    ■   Inference rules, which tell NMAKE what to do in the absence of
  2183.        explicit commands. See Section 3.5.3, "Using Inference Rules," for
  2184.        further information.
  2185.  
  2186.    ■   Directives, which provide conditionals and other structuring
  2187.        techniques. See Section 3.5.4, "Using Directives," for further
  2188.        information.
  2189.  
  2190.  
  2191.  A simple description block
  2192.  
  2193.  All of these elements need not be present in every description file. For
  2194.  many applications, a description file consisting of a single description
  2195.  block is adequate. The example below shows a description file with only one
  2196.  description block:
  2197.  
  2198.    program.exe : program.obj  sub1.obj #update program
  2199.     QCL program.obj sub1.obj
  2200.  
  2201.  The first line of the description block is called the "dependency line." It
  2202.  identifies the "target" to be updated (PROGRAM.EXE) and the "dependents"
  2203.  that make up the target (PROGRAM.OBJ, SUB1.OBJ). If any of the dependents
  2204.  has changed since the target was last modified, NMAKE rebuilds the target.
  2205.  When NMAKE executes this description, it checks the date on which each of
  2206.  the object files was last modified. If either has been modified since the
  2207.  executable program was created, NMAKE executes the second line, which is
  2208.  called the "command line." The QCL command in the above example relinks the
  2209.  program.
  2210.  
  2211.  What about the C source files?
  2212.  
  2213.  Note that the target is an executable file (.EXE) and its dependents are
  2214.  object files (.OBJ). You might wonder why the C source files PROGRAM.C and
  2215.  SUB1.C do not appear in the description block. The reason is that NMAKE
  2216.  
  2217.  assumes that .OBJ files depend on C source files and knows that it must
  2218.  compile PROGRAM.C and SUB1.C to create PROGRAM.OBJ and SUB1.OBJ. How and why
  2219.  NMAKE works this way are advanced topics covered in Section 3.5.3, "Using
  2220.  Inference Rules." You don't need to understand inference rules to create
  2221.  description files and use NMAKE.
  2222.  
  2223.  Of course, if you prefer, you can make your target-executable files depend
  2224.  on the C source files and use the QCL command to compile and link the
  2225.  sources. It is usually preferable, however, to list the object files as
  2226.  dependents.
  2227.  
  2228.  The next section in this chapter, "Building a Simple Description File,"
  2229.  shows how to construct description files, such as the one above, that
  2230.  consist of a single block.
  2231.  
  2232.  
  2233.  3.2  Building a Simple Description File
  2234.  
  2235.  Before you invoke NMAKE, you need to create a description file. Since a
  2236.  description file is simply a text file, you can use any text editor
  2237.  (including the one in the QuickC environment) to create one. NMAKE places no
  2238.  restrictions on the name of the description file, but always looks for a
  2239.  file named MAKEFILE in the current directory unless you tell it otherwise.
  2240.  See Section 3.3, "Invoking NMAKE," for more information on how NMAKE
  2241.  identifies the description file.
  2242.  
  2243.  Depending on the size of the project you are maintaining, your description
  2244.  file may contain one or more description blocks. This section describes the
  2245.  components of a description block and shows you how to build description
  2246.  files that consist only of description blocks.
  2247.  
  2248.  
  2249.  3.2.1  Description Blocks
  2250.  
  2251.  Description blocks are the basic elements of description files. A
  2252.  description block tells NMAKE how to update a target from a group of
  2253.  dependents. Every description block consists of a dependency line, any
  2254.  number of command lines, and optional comments. Figure 3.1 shows the
  2255.  components of a description block.
  2256.  
  2257.  (This figure may be found in the printed book.)
  2258.  
  2259.  
  2260.  3.2.1.1  Dependency Lines
  2261.  
  2262.  A dependency line typically lists one target and one or more of its
  2263.  dependents. A colon (:) separates the target from the dependents.
  2264.  
  2265.  Targets
  2266.  
  2267.  The name of the target goes at the beginning of the line, with no tabs or
  2268.  spaces preceding it. NMAKE creates the target in the current directory
  2269.  unless you include a drive and path specification in its name. A dependency
  2270.  line may contain more than one target, but at least one space must separate
  2271.  each pair of names. Below are some example target names:
  2272.  
  2273.    test1.exe :
  2274.  
  2275.    c:\cprogs\test1.exe :
  2276.  
  2277.    test1.exe test2.exe :
  2278.  
  2279.  The first example specifies the target TEST1.EXE in the current directory.
  2280.  In the second, the target is built in the directory C:\CPROGS. The last
  2281.  example lists two targets to be built from the same set of dependents.
  2282.  
  2283.  Pseudotargets
  2284.  
  2285.  All the targets shown above are executable files. A target, however, need
  2286.  not be an executable file; in fact, it need not be a file at all. NMAKE
  2287.  allows you to specify the following:
  2288.  
  2289.    UPDATE :
  2290.  
  2291.  In this case, UPDATE is considered a "pseudotarget" because it is not a file
  2292.  but simply a label for a set of dependents and commands. Pseudotargets are
  2293.  useful for updating directories and copying groups of files. NMAKE always
  2294.  considers pseudotargets out-of-date.
  2295.  
  2296.  Specifying dependents
  2297.  
  2298.  List the names of the dependent files on the same line as the target but
  2299.  after the colon. Separate the dependent names by one or more spaces. A
  2300.  target can have any number of dependents. If the names of all the dependents
  2301.  do not fit on one line, use a backslash ( \ ) to end the line and continue
  2302.  the list on the next line. This is NMAKE's standard method of line
  2303.  continuation.
  2304.  
  2305.  Dependent names, like target names, can contain drive and path
  2306.  specifications. If you do not include a drive or path specification, NMAKE
  2307.  looks for the dependents in the current directory. For example:
  2308.  
  2309.    mycprog.exe : mycprog.obj  \public\src\graphics.obj
  2310.  
  2311.    UPDATE : *.c \inc\*.h
  2312.  
  2313.  The first example shows two dependents for MYCPROG.EXE. One of them is
  2314.  MYCPROG.OBJ, for which NMAKE searches the current directory. The other is
  2315.  GRAPHICS.OBJ, for which NMAKE searches the \PUBLIC\SRC directory. The second
  2316.  example shows that the pseudotarget UPDATE depends on all the .C files in
  2317.  the current directory and all the header files in the /INC directory.
  2318.  
  2319.  Search paths for dependents
  2320.  
  2321.  You can direct NMAKE to search for dependents in a sequence of other
  2322.  directories by adding a search path enclosed in braces. NMAKE searches the
  2323.  directories specified by the path if it cannot find the file in the current
  2324.  directory. Separate each pair of directories in the path with a semicolon.
  2325.  The backslash at the end of the path is optional. Consider the following:
  2326.  
  2327.    program.exe : program.obj {\me\cwork; q:\src\}tables.obj
  2328.  
  2329.  This line lists two dependents for PROGRAM.EXE. The first, PROGRAM.OBJ, is
  2330.  assumed to be in the current directory. For TABLES.OBJ, a search path is
  2331.  specified. The search path causes NMAKE to look first in the current
  2332.  directory, then in \ME\CWORK, and then in Q:\SRC until it finds the file. If
  2333.  it cannot find the file, all is not lost; it relies on its inference rules
  2334.  to build the file. (See Section 3.5.3 in this chapter for more information
  2335.  on inference rules. For a more detailed description, see Section 7.2.4,
  2336.  "Inference Rules.")
  2337.  
  2338.  
  2339.  3.2.1.2  Command Lines
  2340.  
  2341.  The command lines in a description block give the commands to be carried out
  2342.  if a target is out-of-date with respect to any of its dependents. Commands
  2343.  can be the names of programs, batch files, or any DOS commands─in short, any
  2344.  command that can be issued on the DOS command line.
  2345.  
  2346.  Rules for specifying commands
  2347.  
  2348.  In the typical format of a description file, the commands are on separate
  2349.  lines from the target and its dependents, one command per line. Each line
  2350.  must start with one or more spaces or tab characters. If you forget the
  2351.  space or tab, NMAKE assumes you are specifying a dependency line (or a
  2352.  macro) and displays an error message. You may find it helpful to use a tab
  2353.  to indent the line, making it easy to identify the commands that apply to
  2354.  each target. (This book uses that convention.) For example:
  2355.  
  2356.    program.exe : program.obj sub.obj
  2357.     qcl program.obj sub.obj
  2358.  
  2359.  The command line in the example above invokes QCL to link the two dependent
  2360.  files into a single executable image.
  2361.  
  2362.  If you prefer, however, you can put your commands on the same line as the
  2363.  target and dependents. In that case, a semicolon must precede each command
  2364.  to separate it from the previous item on the line, whether that item is a
  2365.  dependent or another command. The following has the same effect as the
  2366.  previous example:
  2367.  
  2368.    program.exe : program.obj sub.obj ; qcl program.obj sub.obj
  2369.  
  2370.  If a command is too long to fit on one line, you can split it across two or
  2371.  more lines with a backslash ( \ ), in the same way that you split a long
  2372.  dependency list. For example:
  2373.  
  2374.    program.exe : program.obj sub1.obj sub2.obj sub3.obj
  2375.     qcl program.obj sub1.obj sub2.obj  \
  2376.       sub3.obj
  2377.  
  2378.  Be sure that every line that is part of a command begins with a space or
  2379.  tab.
  2380.  
  2381.  
  2382.  3.2.1.3  Comments
  2383.  
  2384.  You can put comments in your description files by using the number sign (#).
  2385.  NMAKE ignores all the text between the number sign and the beginning of the
  2386.  next line. Comments may appear anywhere in an NMAKE description file except
  2387.  on a command line. You can place comment lines between the command lines,
  2388.  but the number sign that starts the comment must be the first character on
  2389.  the line with no spaces or tabs preceding it. The following example shows
  2390.  the use of comments:
  2391.  
  2392.    #makefile for program.exe
  2393.    program.exe : program.obj sub1.obj sub2.obj
  2394.     qcl program.obj sub1.obj sub2.obj
  2395.    # program
  2396.  
  2397.  The first comment documents the purpose of the file. The second causes NMAKE
  2398.  to treat the word  program  as a comment. When NMAKE executes this
  2399.  description, it will rebuild PROGRAM.EXE but will not run it.
  2400.  
  2401.  
  2402.  3.2.1.4  Escape Characters
  2403.  
  2404.  Some characters, such as the number sign (#), have a special meaning when
  2405.  they appear in an NMAKE description file. If you want NMAKE to interpret a
  2406.  character literally, and not with its special NMAKE meanings, you must
  2407.  precede the character with the caret (^). The caret is an "escape
  2408.  character," which means that when it immediately precedes a special
  2409.  character, it causes the character to lose its special meaning.
  2410.  
  2411.  For example, the number sign (#) denotes the start of a comment. To use it
  2412.  in a file name, you must precede it with a caret to "escape" its special
  2413.  meaning, as follows:
  2414.  
  2415.    winning^#.txt
  2416.  
  2417.  NMAKE interprets the example as the file name  winning#.txt .
  2418.  
  2419.  The following characters have special significance to NMAKE, so you must
  2420.  precede them with a caret whenever you want NMAKE to interpret them
  2421.  literally:
  2422.  
  2423.  # ( ) $ ^ \ { } ! @
  2424.  
  2425.  NMAKE ignores a caret that precedes any other character. In addition, carets
  2426.  that appear within quotation marks are not treated as escape characters.
  2427.  
  2428.  
  2429.  Examples
  2430.  
  2431.  Assume you are developing a program named HANDLE. Your directories are
  2432.  organized so that all your source files and object files are stored under
  2433.  the current directory and your include files are in the \INC directory.
  2434.  Consider the following description file:
  2435.  
  2436.    handle.exe : main.obj comm.obj \inc\comm.h
  2437.     QCL /Fehandle.exe main.obj comm.obj
  2438.     handle
  2439.  
  2440.  The dependency line say that HANDLE.EXE should be updated if any of three
  2441.  files change. Two of these files (MAIN.OBJ and COMM.OBJ) are object files;
  2442.  the third (COMM.H) is an include file. If NMAKE determines that it must
  2443.  create a new version of the target, it executes the QCL command. The QCL /Fe
  2444.  option specifies the name HANDLE.EXE for the executable program. NMAKE
  2445.  executes the new version of HANDLE.EXE after creating it.
  2446.  
  2447.  If the current directory contains only the files for HANDLE.EXE, and none
  2448.  for any other programs, the description file could be rewritten as follows:
  2449.  
  2450.  
  2451.    handle.exe : *.obj \inc\comm.h
  2452.     QCL /Fehandle.exe *.obj
  2453.     handle
  2454.  
  2455.  NMAKE expands the wild cards in the dependent names when it starts to build
  2456.  the target.
  2457.  
  2458.  
  2459.  3.2.2  The CC Macro
  2460.  
  2461.  The sample description files presented so far have contained only
  2462.  description blocks─no macros, directives, or inference rules. For the most
  2463.  part, you can get by without any of these features.
  2464.  
  2465.  Before you use NMAKE with QuickC, however, you need to know about one
  2466.  particular macro, CC. The predefined macro CC tells NMAKE which C compiler
  2467.  to use when it tries to create .OBJ files from .C files. Recall that NMAKE
  2468.  knows that .OBJ files depend on .C files, which is why only .OBJ files
  2469.  appear in the examples up to this point. NMAKE implicitly compiles .C files
  2470.  into .OBJ files, using the compiler specified by the CC macro.
  2471.  
  2472.  As you may be aware, NMAKE is provided with both Microsoft C Professional
  2473.  Development System and QuickC. For that reason, CC is predefined to invoke
  2474.  the C compiler included with the Professional Development System, CL. You
  2475.  must redefine CC to invoke QCL, the QuickC compiler.
  2476.  
  2477.  To redefine the CC macro, add this line at the top of your description file:
  2478.  
  2479.  
  2480.    CC = qcl
  2481.  
  2482.  No spaces or tabs can precede CC; it must be the first item on the line. The
  2483.  spaces around the equal sign are optional.
  2484.  
  2485.  Continuing with the example in Section 3.2.1.4, the description file would
  2486.  look like the following:
  2487.  
  2488.    CC = qcl
  2489.    handle.exe : *.obj \inc\comm.h
  2490.     QCL /Fehandle.exe *.obj
  2491.     handle
  2492.  
  2493.  This description block has the same effect as the earlier ones, except that
  2494.  if any .OBJ files in the current directory must be updated from .C files, it
  2495.  ensures that NMAKE will use the QuickC compiler to do it. The QCL command in
  2496.  the example is independent of the CC macro; the command line explicitly
  2497.  invokes QuickC to link the object files into an executable file.
  2498.  
  2499.  Redefining CC in the TOOLS.INI file
  2500.  
  2501.  As an alternative, you can redefine CC in TOOLS.INI, the
  2502.  tools-initialization file. The TOOLS.INI file contains environment variables
  2503.  and initial (default) settings for various utility programs. You may already
  2504.  have a TOOLS.INI file; if not, you can create one with any text editor.
  2505.  
  2506.  Items that apply to NMAKE appear in the file following the [nmake] tag. To
  2507.  change the definition of the CC macro, add the following line after the tag:
  2508.  
  2509.  
  2510.    CC=qcl
  2511.  
  2512.  Whenever you invoke NMAKE, the utility looks for TOOLS.INI first in the
  2513.  current directory and then in the directory specified by the INIT
  2514.  environment variable. To see what INIT is set to, type the SET command at
  2515.  DOS command level.
  2516.  
  2517.  
  2518.  3.3  Invoking NMAKE
  2519.  
  2520.  You can invoke NMAKE in either of two ways:
  2521.  
  2522.  
  2523.    1.  By giving the NMAKE command and all options, macros, and targets on
  2524.        the DOS command line
  2525.  
  2526.    2.  By giving the NMAKE command and the name of a response file that
  2527.        contains all the options, macros, and targets
  2528.  
  2529.  
  2530.  This section describes both methods.
  2531.  
  2532.  
  2533.  3.3.1  Invoking NMAKE from the DOS Command Line
  2534.  
  2535.  Under most circumstances you'll probably issue the NMAKE command from the
  2536.  DOS command line. The command has the following format:
  2537.  
  2538.  (This figure may be found in the printed book.)
  2539.  
  2540.  The items in italics are optional arguments and are described below:
  2541.  
  2542.  
  2543.    ■   The options modify the action of the NMAKE command. The most commonly
  2544.        used NMAKE options are described in the section titled "NMAKE
  2545.        Options"; the complete set is covered in Chapter 7.
  2546.  
  2547.    ■   The macrodefinitions give text to replace macro names in the
  2548.        description file. Section 3.5.2, "Using Macros," introduces macros and
  2549.        explains how and when to use them. See Section 7.2.3, "Macros," for
  2550.        details.
  2551.  
  2552.    ■   The targets field lists one or more targets for NMAKE to build. If you
  2553.        do not specify a target, NMAKE builds only the first one in the file.
  2554.        You can find more information on targets in Section 3.2.1,
  2555.        "Description Blocks," and in Section 7.2.1. Because all the arguments
  2556.        are optional, the simplest form of the NMAKE command is just
  2557.  
  2558.  
  2559.    NMAKE
  2560.  
  2561.  The default file MAKEFILE
  2562.  
  2563.  When you invoke NMAKE with the preceding command, it looks in the current
  2564.  directory for a file named MAKEFILE to use as the description file. If no
  2565.  such file exists, it displays an error message.
  2566.  
  2567.  You can specify an alternate description file by using the /F option,
  2568.  described below in Section 3.4.1, "Controlling Input."
  2569.  
  2570.  
  2571.  3.3.2  Invoking NMAKE with a Response File
  2572.  
  2573.  For more complicated updates, and whenever the NMAKE command line exceeds
  2574.  the DOS limit of 128 characters, you will need to create a response file.
  2575.  The response file contains the options, targets, and macros you would type
  2576.  on the DOS command line. It is not the same as the NMAKE description file;
  2577.  instead, it is comparable to a QLINK or LIB response file.
  2578.  
  2579.  To invoke NMAKE with a response file, issue the following command:
  2580.  
  2581.    NMAKE @responsefile
  2582.  
  2583.  For responsefile, use the name of the file that contains the options,
  2584.  targets, and macros you would otherwise type on the NMAKE command line.
  2585.  
  2586.  
  2587.  3.4  NMAKE Options
  2588.  
  2589.  NMAKE provides a rich set of options that control the descriptions it reads
  2590.  as input, the details of its execution, and the messages it displays on
  2591.  output. The following sections describe some of the most useful NMAKE
  2592.  options. Section 7.3 covers all the options in detail.
  2593.  
  2594.  Options immediately follow the NMAKE command on the DOS command line and
  2595.  precede the name of the description file, if you supply one. NMAKE accepts
  2596.  options in uppercase or lowercase letters, with either a slash ( / ) or a
  2597.  dash (-) to introduce each option. For example, -F, /F, -f, and /f all
  2598.  represent the same option. In options that take file-name arguments, for
  2599.  example, /F and /X, the file name and the option must be separated by a
  2600.  space.
  2601.  
  2602.  
  2603.  3.4.1  Controlling Input
  2604.  
  2605.  You can specify the description file from which NMAKE will take its input
  2606.  with the /F option. This option has the following form:
  2607.  
  2608.  /F filename
  2609.  
  2610.  If you specify the /F option, NMAKE uses filename as the name of the
  2611.  description file. The space separating /F and filename is required. In place
  2612.  of a file name, you can enter a dash (-) to tell NMAKE to read the
  2613.  description from standard input, typically your keyboard.
  2614.  
  2615.  If you omit the /F option, NMAKE looks for a file named MAKEFILE in the
  2616.  current directory. If no such file exists, it displays an error message.
  2617.  
  2618.  ────────────────────────────────────────────────────────────────────────────
  2619.  NOTE
  2620.  
  2621.  Unless you use the /F option, NMAKE always searches for the file MAKEFILE in
  2622.  the current directory. Therefore, you should explicitly specify /F to avoid
  2623.  unintentionally using MAKEFILE.
  2624.  ────────────────────────────────────────────────────────────────────────────
  2625.  
  2626.  The following is an example of the /F option:
  2627.  
  2628.    NMAKE /F hello.mak
  2629.  
  2630.  This command invokes the NMAKE utility and specifies HELLO.MAK, in the
  2631.  current directory, as the description file.
  2632.  
  2633.  
  2634.  3.4.2  Controlling Execution
  2635.  
  2636.  The following options change the way NMAKE interprets the description file:
  2637.  
  2638.  
  2639.  Option                            Effect
  2640.  ────────────────────────────────────────────────────────────────────────────
  2641.  /A                                Builds all of the targets requested,
  2642.                                    even if they are not out-of-date.
  2643.  
  2644.  /I                                Ignores exit codes returned by commands
  2645.                                    executed within a description file.
  2646.                                    NMAKE continues processing the
  2647.                                    description file despite the errors.
  2648.  
  2649.  /N                                Displays the commands from the
  2650.                                    description file but does not execute
  2651.                                    them. Use this option to determine which
  2652.                                    targets are out-of-date without
  2653.                                    rebuilding them. You can also use it in
  2654.                                    debugging description files.
  2655.  
  2656.  /T                                "Touches" any target files that are
  2657.                                    outdated. Touching a file causes its
  2658.                                    date of modification to be changed to
  2659.                                    the current date. It has no effect on
  2660.                                    the contents of the file.
  2661.  
  2662.  
  2663.  3.4.3  Controlling Output
  2664.  
  2665.  As NMAKE runs, it displays each command that it executes. It displays a
  2666.  diagnostic message if it cannot find a file or command needed to complete a
  2667.  description block or if any command returns an error. You can change the
  2668.  type and number of messages that NMAKE returns by using the options below:
  2669.  
  2670.  Option                            Effect
  2671.  ────────────────────────────────────────────────────────────────────────────
  2672.  /C                                Suppresses the Microsoft copyright
  2673.                                    message and all nonfatal or warning
  2674.                                    messages.
  2675.  
  2676.  /D                                Displays the modification date of each
  2677.                                    target or dependent file when it checks
  2678.                                    the date.
  2679.  
  2680.  /P                                Prints all macro definitions and target
  2681.                                    descriptions.
  2682.  
  2683.  /S                                Executes "silently"; does not display
  2684.                                    commands as they are executed.
  2685.  
  2686.  /X filename                       Sends all error output to filename. A
  2687.                                    space must separate /X from filename.
  2688.                                    Specifying a dash (-) instead of a file
  2689.                                    name sends error output to the standard
  2690.                                    output device.
  2691.  
  2692.  
  2693.  Examples
  2694.  
  2695.  The following command invokes NMAKE with PHYSICS.MAK as the description
  2696.  file:
  2697.  
  2698.    NMAKE /F physics.mak /N
  2699.  
  2700.  The /N option tells NMAKE to read, but not to execute, any of the commands
  2701.  within the file PHYSICS.MAK. NMAKE checks the modification dates on the
  2702.  files and displays the commands it would execute if the /N option were not
  2703.  present. Use this option to find out ahead of time what files are
  2704.  out-of-date so you can estimate how long a build might take. You can also
  2705.  use it in debugging description files.
  2706.  
  2707.  After using the /N option to check what NMAKE would do, you might invoke it
  2708.  with the command line below:
  2709.  
  2710.    NMAKE /F physics.mak /C /S
  2711.  
  2712.  The /C option suppresses the NMAKE copyright message and any warning
  2713.  messages. The /S option suppresses the display of commands. You will,
  2714.  however, still see the copyright messages for any commands that NMAKE
  2715.  invokes and the output those commands generate.
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  3.5  Building Complex Description Files
  2722.  
  2723.  Most software projects can be maintained using the features already
  2724.  described. However, description files for large projects may become
  2725.  complicated and cumbersome, especially if each module is dependent on many
  2726.  source and include files. Using NMAKE's advanced features, you can shorten
  2727.  your description files and make them more powerful at the same time.
  2728.  
  2729.  This section covers several of NMAKE's advanced features:
  2730.  
  2731.  
  2732.    ■   Special characters on command lines
  2733.  
  2734.    ■   Macros
  2735.  
  2736.    ■   Inference rules
  2737.  
  2738.    ■   Directives
  2739.  
  2740.  
  2741.  Figure  shows a more complicated description file than those presented so
  2742.  far.
  2743.  
  2744.  (This figure may be found in the printed book.)
  2745.  
  2746.  
  2747.  3.5.1  Using Special Characters to Modify Commands
  2748.  
  2749.  NMAKE recognizes three special characters that modify its treatment of
  2750.  commands. These characters give you additional control over the execution of
  2751.  individual commands, whereas NMAKE's options apply to all the commands in
  2752.  the description file.
  2753.  
  2754.  The characters go before the command name and can be separated from the name
  2755.  by one or more spaces, though they need not be. At least one space or tab
  2756.  must precede the character on the line. To use two or three special
  2757.  characters with a single command, put them one after the other on the
  2758.  command line. The special characters are as follows:
  2759.  
  2760.  Character                         Action
  2761.  ────────────────────────────────────────────────────────────────────────────
  2762.  Dash (-)                          Turns off error checking for the command
  2763.                                    it precedes so that NMAKE continues
  2764.                                    executing if an error occurs. A dash
  2765.                                    followed by a number suspends error
  2766.                                    checking for error levels at the number
  2767.                                    and below.
  2768.  
  2769.  At sign (@)                       Suppresses display of the command when
  2770.                                    it is
  2771.                                    executed.
  2772.  
  2773.  Exclamation point (!)             Causes the command to be executed
  2774.                                    iteratively, once for each dependent
  2775.                                    file, if it uses one of the macros for
  2776.                                    dependent names. (The macros are
  2777.                                    described in the Section 3.5.2.)
  2778.  
  2779.  Note that the dash (-) has the same effect as the /I option. Also, the "at"
  2780.  sign (@) is similar to the /S option.
  2781.  
  2782.  
  2783.  Examples
  2784.  
  2785.    beatles.exe : john.asm paul.c george.c ringo.c
  2786.     -QCL /c paul.c george.c ringo.c
  2787.     MASM john
  2788.     QLINK john paul george ringo, beatles.exe;
  2789.  
  2790.  In the example above, the dash preceding the QCL command means that NMAKE
  2791.  will attempt to execute the MASM and QLINK commands even if  errors occur
  2792.  during compilation.
  2793.  
  2794.    beatles.exe : john.asm paul.c george.c ringo.c
  2795.     -@QCL /c paul.c george.c ringo.c
  2796.      MASM john
  2797.     @QLINK john paul george ringo, beatles.exe;
  2798.  
  2799.  The description in this example has the same effect as that in the previous
  2800.  example, except that neither the QCL nor the QLINK command is displayed when
  2801.  it is executed.
  2802.  
  2803.  
  2804.  3.5.2  Using Macros
  2805.  
  2806.  You can use macros to streamline your description files. A "macro" is a name
  2807.  that replaces other text in the description file in the same way that a
  2808.  macro defined in a QuickC #define directive replaces other text in a
  2809.  program. Wherever the name appears in the description file, NMAKE
  2810.  substitutes the text associated with it. To change the meaning of the name,
  2811.  you simply change the text assigned to it in the macro definition.
  2812.  
  2813.  Macros are most useful in two situations:
  2814.  
  2815.  
  2816.    1.  To replace all or part of a file name so that a single NMAKE
  2817.        description file can be used to update more than one program.
  2818.  
  2819.    2.  To supply options for commands within the NMAKE description file. For
  2820.        example, you might define a macro to represent your usual debug
  2821.        options for the QCL command. Then, to compile with a different set of
  2822.        options, you need not edit the description file. You merely change the
  2823.        macro definition.
  2824.  
  2825.  
  2826.  NMAKE provides two types of macros: predefined macros and macros you define.
  2827.  This section shows how to use them.
  2828.  
  2829.  
  2830.  3.5.2.1  Defining Your Own Macros
  2831.  
  2832.  A "macro definition" tells NMAKE what text to substitute for a macro. You
  2833.  can put macro definitions in the description file, on the NMAKE command
  2834.  line, or in your TOOLS.INI file. In the description file, each macro
  2835.  definition must be on a separate line. On the command line, macro
  2836.  definitions follow any NMAKE options and precede any targets. In the
  2837.  TOOLS.INI file, macro definitions appear in a section following the [nmake]
  2838.  tag, each on a separate line, as described previously in Section 3.2.2, "The
  2839.  CC Macro."
  2840.  
  2841.  No matter where you put them, macro definitions take the following form:
  2842.  
  2843.  macroname = string
  2844.  
  2845.  The macroname is the name you use in the description file. A macro name can
  2846.  consist of any alphanumeric characters and the underscore ( _ ) character.
  2847.  The string is the text that replaces the macro name when the description
  2848.  file is processed.
  2849.  
  2850.  Macros on the command line
  2851.  
  2852.  On the NMAKE command line, white space cannot appear on either side of the
  2853.  equal sign because it causes DOS to treat the macro name and its definition
  2854.  as separate tokens. In addition, if string contains any embedded white
  2855.  space, you must enclose it in double quotation marks, as follows:
  2856.  
  2857.    my_macro="this string"
  2858.  
  2859.  Alternatively, you can enclose the entire macro definition─macroname and
  2860.  string─in double quotation marks. In that case, spaces can surround the
  2861.  equal sign because DOS treats all the characters within quotation marks as a
  2862.  single token. Thus, the following is also acceptable:
  2863.  
  2864.    "my_macro = this string"
  2865.  
  2866.  Macros in the description file
  2867.  
  2868.  In a description file, define each macro on a new line. The definition must
  2869.  start at the beginning of the line with no preceding white space. NMAKE
  2870.  ignores any white space surrounding the equal sign. Quotation marks are
  2871.  unnecessary as well; if you use them, they will become part of the string.
  2872.  
  2873.  This example defines a macro named  pname  and another named  t:
  2874.  
  2875.    pname = mycprog.exe
  2876.  
  2877.    t = this
  2878.  
  2879.  To use a macro within a command or dependency line, specify its name in
  2880.  parentheses preceded by a dollar sign ($), as follows:
  2881.  
  2882.  $(macroname)
  2883.  
  2884.  If you need to use a literal dollar sign in a description file, type it
  2885.  twice ($$) or use the caret (^) escape character.
  2886.  
  2887.  The lines below show how to refer to the macros defined in the previous
  2888.  example. Note that if the name of a macro is only one character long, you
  2889.  can omit the parentheses.
  2890.  
  2891.    $(pname)
  2892.  
  2893.    $t
  2894.  
  2895.  Once you've defined a macro, the only way to remove its definition is to use
  2896.  the !UNDEF directive. See Section 3.5.4, "Using Directives," for more
  2897.  information.
  2898.  
  2899.  
  2900.  Examples
  2901.  
  2902.  A common use of macros is to specify the options for a command. For example,
  2903.  the following description block uses the macro  copts  to represent QCL
  2904.  options.
  2905.  
  2906.    picture.exe : picture.c graphics.c fileio.c
  2907.     qcl $(copts)  picture.c graphics.c fileio.c
  2908.  
  2909.  Assuming the description file is named PICTURE.MAK, the command line might
  2910.  be the following:
  2911.  
  2912.    NMAKE /F picture.mak copts="/C /P"
  2913.  
  2914.  At execution time, NMAKE substitutes  /C /P  wherever  $(copts)  appears in
  2915.  the description file. The result is the same as if the following description
  2916.  were used:
  2917.  
  2918.    picture.exe : picture.c graphics.c fileio.c
  2919.     qcl /C /P  picture.c graphics.c fileio.c
  2920.  
  2921.  Note that the /P option causes QuickC to create a preprocessor listing, and
  2922.  the /C option retains the comments from the source files in the preprocessor
  2923.  listing.
  2924.  
  2925.  
  2926.  3.5.2.2  Predefined Macros
  2927.  
  2928.  Some macros are predefined by NMAKE. You have already seen one of these, CC.
  2929.  Some of the other predefined macros are described below. For a complete
  2930.  list, see Section 7.2.3.3.
  2931.  
  2932.  Macros for Program Names (CC, AS, MAKE)   - The CC macro, already
  2933.  introduced, represents the C compiler command that NMAKE executes to create
  2934.  object files from C source files. The AS macro is similar. It stands for the
  2935.  name of the assembler that NMAKE executes when it needs to create object
  2936.  files from .ASM sources. Both of these macros are predefined by NMAKE. You
  2937.  can change their definitions in the description file, in the TOOLS.INI file,
  2938.  or on the NMAKE command line. Their default definitions are
  2939.  
  2940.    CC = cl
  2941.    AS = masm
  2942.  
  2943.  These two macros are primarily used in inference rules. (See Section 3.5.3,
  2944.  "Using Inference Rules," or Section 7.2.4, "Inference Rules," for more
  2945.  information.)
  2946.  
  2947.  The MAKE macro is defined as the command you use to invoke NMAKE. Use this
  2948.  macro, rather than the NMAKE command itself, to invoke NMAKE recursively
  2949.  within a description file. Recursion is typically used in building large
  2950.  software projects, such as compilers, and frequently involves the use of
  2951.  conditional directives. (An example of the recursive use of NMAKE appears
  2952.  later in this chapter in Section 3.5.4.2, "Conditional Directives.")
  2953.  
  2954.  Macros for Target Names ($@, $*) - The $@ macro represents the full name of
  2955.  the target, and the $* macro represents the base name of the target, which
  2956.  is the full name with the extension deleted. These two macros are typically
  2957.  used in inference rules, but for the sake of discussion, this section will
  2958.  show their use in description files.
  2959.  
  2960.  Consider the following description block:
  2961.  
  2962.    $(target) : picture.obj graphics.obj fileio.obj
  2963.     QLINK picture.obj graphics.obj fileio.obj, $@;
  2964.     $*
  2965.  
  2966.  Assume NMAKE is invoked with the following command:
  2967.  
  2968.    NMAKE target=trees.exe
  2969.  
  2970.  The command line supplies text for the macro  target, which sets the full
  2971.  name of the target to  trees.exe. At execution time, NMAKE substitutes the
  2972.  text for the macro as explained in Section 3.5.2. However, this file goes
  2973.  one step further. Instead of repeating the user-defined  $(target)  macro as
  2974.  the output of the QLINK command, it uses the predefined $@ macro. This macro
  2975.  stands for the full name of the target and therefore has the same meaning as
  2976.   $(target). Thus, the QLINK command links the object files into  trees.exe.
  2977.  In the last line of the file, the $* macro stands for the base name of the
  2978.  target. This line causes  trees.exe  to be executed as a program.
  2979.  
  2980.  NMAKE automatically substitutes for these macros. It picks up the target
  2981.  name from its position on the dependency line in the description file. You
  2982.  cannot assign a value to a predefined macro on the command line.
  2983.  
  2984.  NMAKE provides additional predefined macros that you can use to specify
  2985.  target names. See Section 7.2.3.3, "Predefined Macros," for details.
  2986.  
  2987.  Macros for Dependent Names ($**, $?) - These macros signify the names of one
  2988.  or more dependents. The $** macro represents the complete list of dependent
  2989.  files for the target. The $? macro represents only the dependents that are
  2990.  out-of-date relative to the target. These two macros are commonly used with
  2991.  the special characters that modify commands to prevent NMAKE from doing any
  2992.  more work than necessary.
  2993.  
  2994.  The example below shows the description file from the previous section using
  2995.  macros for the dependent names:
  2996.  
  2997.    $(target) : picture.obj graphics.obj fileio.obj
  2998.     QLINK $**, $@;
  2999.     $*
  3000.  
  3001.  The first line of the example defines all the dependents for the target. On
  3002.  the next line, the QLINK command links all the dependents, represented by
  3003.  $**, into a single executable image. Finally, the target is run as a
  3004.  program.
  3005.  
  3006.  NMAKE provides additional predefined macros that you can use to specify
  3007.  dependent names. See Section 7.2.3.3, "Predefined Macros," for details.
  3008.  
  3009.  
  3010.  3.5.2.3  Precedence of Macro Definitions
  3011.  
  3012.  Because macros can be defined in so many places, it is quite possible to
  3013.  give a macro more than one definition. Sometimes this is desirable. For
  3014.  instance, you may wish to override a macro definition for a single execution
  3015.  of the description file.
  3016.  
  3017.  NMAKE's precedence rules determine which macro definition it uses.
  3018.  Precedence depends on where the macro is defined. Listed below is the order
  3019.  of precedence from highest to lowest priority:
  3020.  
  3021.  
  3022.    1.  Macros defined on the NMAKE command line.
  3023.  
  3024.    2.  Macros defined in the description file and in files included in the
  3025.        description file with the !INCLUDE directive (see Section 3.5.4,
  3026.        "Using Directives").
  3027.  
  3028.    3.  Macros inherited from environment variables.
  3029.  
  3030.    4.  Macros defined in the TOOLS.INI file.
  3031.  
  3032.    5.  Macros defined by NMAKE, such as CC and AS.
  3033.  
  3034.  
  3035.  Figure  shows how macros defined on the command line take priority over
  3036.  those in the description file.
  3037.  
  3038.  In addition, you can force environment variables to override assignments in
  3039.  the description file, using the /E option.
  3040.  
  3041.  
  3042.  3.5.3  Using Inference Rules
  3043.  
  3044.  Most of the description blocks shown so far in this chapter contain commands
  3045.  to update the target from its dependents. Under certain conditions, however,
  3046.  NMAKE will follow a set of rules, called "inference rules," to create the
  3047.  target. Like macros, several inference rules are predefined, and NMAKE
  3048.  allows you to define your own.
  3049.  
  3050.  (This figure may be found in the printed book.)
  3051.  
  3052.  If you supply a description block that does not contain any commands, or if
  3053.  the dependents of your target do not exist, NMAKE relies on inference rules.
  3054.  Whether predefined or user defined, inference rules are based on the
  3055.  file-name extensions of the target and dependent files. In short, they tell
  3056.  NMAKE how to create a file with a particular extension from a file with the
  3057.  same base name and a different extension.
  3058.  
  3059.  Below is a simple inference rule:
  3060.  
  3061.    .c.exe :
  3062.     QCL $*.c
  3063.  
  3064.  This rule defines how to make a file with the .EXE extension from a file
  3065.  with the same base name and the .C extension. The first line says that the
  3066.  rule tells how to go from a file with the .C extension to a file with the
  3067.  .EXE extension. The second line gives the command that creates the .EXE
  3068.  file─in this case, the QCL command. The $* macro represents the base name of
  3069.  the target with the extension deleted.
  3070.  
  3071.  An inference rule looks very similar to a description block, with two
  3072.  exceptions:
  3073.  
  3074.  
  3075.    1.  An inference rule lists two file-name extensions instead of target
  3076.        names.
  3077.  
  3078.    2.  Inference rules do not list dependents.
  3079.  
  3080.  
  3081.  If the inference rule shown in the example above were in effect, NMAKE would
  3082.  use it for the following description block:
  3083.  
  3084.    zfile.exe : zfile.c
  3085.  
  3086.  NMAKE applies the inference rule for three reasons:
  3087.  
  3088.  
  3089.    1.  The description block does not contain any commands.
  3090.  
  3091.    2.  The file-name extensions of the target file and its dependent match
  3092.        those in the rule.
  3093.  
  3094.    3.  The base name of the target and dependent are the same.
  3095.  
  3096.  
  3097.  The combination of the inference rule and the description block above has
  3098.  the same effect as the following description block:
  3099.  
  3100.    zfile.exe : zfile.c
  3101.     QCL zfile.c
  3102.  
  3103.  
  3104.  3.5.3.1  Predefined Inference Rules
  3105.  
  3106.  NMAKE has three predefined inference rules. The predefined rules make use of
  3107.  the default macros CC and AS, along with several of the predefined macros
  3108.  that have already been presented.
  3109.  
  3110.  From .C to .OBJ
  3111.  
  3112.  One predefined rule builds .OBJ files from .C files:
  3113.  
  3114.    .c.obj:
  3115.     $(CC) $(CFLAGS) /c $*.c
  3116.  
  3117.  When NMAKE applies this rule, it substitutes the current values of the
  3118.  macros CC and CFLAGS for $(CC) and $(CFLAGS). (The CFLAGS macro lists
  3119.  options for the C compiler.) It then looks for a C source file with the same
  3120.  name as the target and compiles the source file without linking. This is the
  3121.  rule NMAKE uses for the examples in this chapter that list .OBJ files─not C
  3122.  source files─as dependents.
  3123.  
  3124.  With the description block below, NMAKE would use this inference rule if it
  3125.  needed to create or update one or more of the .OBJ files listed in the
  3126.  dependency list:
  3127.  
  3128.    menu.exe : menu.obj funcs.obj draw.obj
  3129.     QLINK menu funcs draw;
  3130.  
  3131.  If the current directory contains .C source files with the same base names
  3132.  as the .OBJ files in the example, NMAKE compiles them according to the
  3133.  inference rule.
  3134.  
  3135.  From .C to .EXE
  3136.  
  3137.  Another predefined rule, shown below, builds .EXE files from .C files:
  3138.  
  3139.    .c.exe:
  3140.     $(CC) $(CFLAGS) $*.c
  3141.  
  3142.  This rule causes NMAKE to use the same files as the previous rule but to
  3143.  link the output into an executable image. Continuing with the example, NMAKE
  3144.  would use this rule if the description file contained the following:
  3145.  
  3146.    menu.exe : menu.c
  3147.  
  3148.  Note that the files FUNCS.C and DRAW.C are not shown here. NMAKE would not
  3149.  create .EXE files for them because their base names are different from that
  3150.  of the .EXE file that NMAKE is trying to create.
  3151.  
  3152.  From .ASM to .OBJ
  3153.  
  3154.  The third predefined rule builds .OBJ files from .ASM files:
  3155.  
  3156.    .asm.obj:
  3157.     $(AS) $(AFLAGS) $*;
  3158.  
  3159.  This rule tells NMAKE to look for an assembly-language source file with the
  3160.  same name as the target file and to invoke the Macro Assembler to create an
  3161.  object file. (The AFLAGS macro lists options for the assembler command.)
  3162.  NMAKE would use this inference rule under the same conditions as the first
  3163.  rule. For example:
  3164.  
  3165.    menu.exe : menu.obj funcs.obj draw.obj
  3166.     QLINK menu funcs draw;
  3167.  
  3168.  If the current directory contains .ASM files with the same base names as any
  3169.  of the .OBJ files, NMAKE uses this final inference rule.
  3170.  
  3171.  
  3172.  3.5.3.2  Defining Inference Rules
  3173.  
  3174.  The predefined inference rules are adequate for most situations.
  3175.  Nevertheless, NMAKE allows you to define your own inference rules in the
  3176.  description file or in your TOOLS.INI file . You can also define them in a
  3177.  separate file that you include in your description file. (See Section
  3178.  3.5.4.1 for information on the !INCLUDE directive.) Inference rules cannot
  3179.  be defined on the NMAKE command line.
  3180.  
  3181.  To define an inference rule, use a statement in the following form :
  3182.  
  3183.  .fromext.toext:  command    .
  3184.  
  3185.  The first line defines the types of files to which the rule applies. It
  3186.  contains the extension of the "from" file first, and then the extension of
  3187.  the "to" file. The second and subsequent lines give the commands that NMAKE
  3188.  must execute to create a file with the "to" file extension from a file that
  3189.  has the same base name and the "from" file extension. You can specify one or
  3190.  more commands, just as in a description block.
  3191.  
  3192.  Specifying a path for .fromext or .toext
  3193.  
  3194.  Sometimes you may want to associate a directory with each type of file. For
  3195.  instance, some programmers organize all their source files in one directory
  3196.  and their object files in another. NMAKE allows you to precede each of the
  3197.  extensions with a path, as follows:
  3198.  
  3199.  {frompath}.fromext{topath}.toext
  3200.  
  3201.  The example below shows a rule that starts with source files in one
  3202.  directory and creates object files in a different directory:
  3203.  
  3204.    {\usr\graphics\source}.c{\usr\graphics\obj}.obj
  3205.  
  3206.  You can specify only one path for each extension. If you need to pull source
  3207.  files from several different directories and place all the object files in
  3208.  one directory, you must define a separate inference rule for each source
  3209.  directory.
  3210.  
  3211.  
  3212.  3.5.3.3  Precedence of Inference Rules
  3213.  
  3214.  Like macros, inference rules can be defined in several places; the location
  3215.  of an inference rule's definition establishes its precedence. NMAKE applies
  3216.  inference rules in the following order, from highest to lowest priority:
  3217.  
  3218.  
  3219.    1.  Inference rules defined in the description file or in files included
  3220.        in the description file by the !INCLUDE directive (described in
  3221.        Section 3.5.4.1)
  3222.  
  3223.    2.  Inference rules defined in the TOOLS.INI file
  3224.  
  3225.    3.  Predefined inference rules
  3226.  
  3227.  
  3228.  
  3229.  3.5.4  Using Directives
  3230.  
  3231.  Directives provide additional control over the execution of commands, beyond
  3232.  what you can do with macros and inference rules. Using directives, you can
  3233.  
  3234.  
  3235.    ■   Include the contents of another file in your description file
  3236.  
  3237.    ■   Conditionally execute a command or group of commands
  3238.  
  3239.    ■   Issue error messages from within a description file
  3240.  
  3241.  
  3242.  In effect, directives let you build description files that act like DOS
  3243.  batch files. Such description files are especially useful for large software
  3244.  projects in which the work is divided among several people. A description
  3245.  file can compile each source file, build any necessary libraries, and link
  3246.  the entire program. If errors occur anywhere in the process, the description
  3247.  file can issue diagnostic messages, possibly take corrective action, or
  3248.  terminate execution.
  3249.  
  3250.  Each directive begins on a new line in the description file. A directive
  3251.  starts with an exclamation point (!) as the first character on the line.
  3252.  NMAKE allows, but does not require, spaces between the name of the directive
  3253.  and the exclamation point.
  3254.  
  3255.  The sections that follow describe several of the NMAKE directives. For
  3256.  information on all the directives, see Section 7.2.5.
  3257.  
  3258.  
  3259.  3.5.4.1  The !INCLUDE Directive
  3260.  
  3261.  The !INCLUDE directive is similar to the #include preprocessor directive in
  3262.  QuickC. When NMAKE encounters !INCLUDE, it reads the contents of another
  3263.  description file before continuing with the current description file. Use
  3264.  the !INCLUDE directive to include a standard set of inference rules or
  3265.  macros in your description files. For example:
  3266.  
  3267.    !INCLUDE rules.mak
  3268.  
  3269.  The !INCLUDE directive in this example tells NMAKE to begin reading from the
  3270.  file RULES.MAK in the current directory and to evaluate the contents of
  3271.  RULES.MAK as part of the current description file.
  3272.  
  3273.  If you enclose the file name in angle brackets (<>), NMAKE searches for the
  3274.  file in the directories specified by the INCLUDE environment variable.
  3275.  
  3276.  
  3277.  3.5.4.2  Conditional Directives (!IF, !ELSE, !ENDIF)
  3278.  
  3279.  The conditional directives allow you to specify blocks of commands to be
  3280.  executed depending on the value of a constant expression. A conditional
  3281.  block has the following form:
  3282.  
  3283.  !IF expression  statements !ELSE  statements !ENDIF
  3284.  
  3285.  If the value of expression is nonzero (true), NMAKE executes the statements
  3286.  between the !IF directive and the !ELSE directive. If the value of the
  3287.  constant expression is zero (false), NMAKE executes the statements between
  3288.  the !ELSE directive and the !ENDIF directive.
  3289.  
  3290.  Expressions
  3291.  
  3292.  The expression may consist of integer constants, string constants, or
  3293.  program invocations that return constants. Integer constants can use the C
  3294.  unary operators for numerical negation (-), logical negation (!), and one's
  3295.  complement arithmetic (~); or the C binary operators, including arithmetic
  3296.  operators, bitwise operators, and logical operators. (See Table  for a
  3297.  complete list.) For string constants, only the equality (==) and inequality
  3298.  (!=) operators are valid. You can use parentheses to group expressions
  3299.  wherever necessary. Program invocations, when used in conditionals, must be
  3300.  enclosed in square brackets.
  3301.  
  3302.  Recursion
  3303.  
  3304.  Conditional directives are commonly used to test whether a program executed
  3305.  successfully. The program can be a DOS command, a program you have written,
  3306.  or even NMAKE itself. In the following description block, note the use of
  3307.  the $(MAKE) macro to invoke the program recursively:
  3308.  
  3309.    $(target) : picture.obj fileio.obj error.obj
  3310.    # Try to build pix.lib
  3311.    !IF ![$(MAKE) /f pix.mak]
  3312.     QLINK $**,$(target),,pix.lib;
  3313.     COPY pix.lib \mylibs
  3314.    !ELSE
  3315.    #Build didn't work, so link with old version
  3316.     QLINK $**,$(target),,\mylibs\pix.lib;
  3317.    !ENDIF
  3318.  
  3319.  In this case, the expression is the value returned by another invocation of
  3320.  NMAKE. NMAKE, like many programs, returns the value 0 if it executes
  3321.  successfully and a nonzero errorlevel code otherwise. This is the opposite
  3322.  of the usual conditional test, which considers zero to be true and nonzero
  3323.  to be false. Therefore, the !IF directive must test the logical negation of
  3324.  the expression; that is, it uses the exclamation-point operator outside the
  3325.  square brackets.
  3326.  
  3327.  If the library  pix.lib  is built successfully, NMAKE executes the QLINK and
  3328.  COPY commands on the two lines immediately following the !IF directive.
  3329.  
  3330.  If the library cannot be built successfully, NMAKE executes the command
  3331.  following the !ELSE directive. This command links all the dependents (named
  3332.  by the special $** macro) with an old version of the library.
  3333.  
  3334.  
  3335.  3.5.4.3  Testing for Macro Definitions (!IFDEF, !IFNDEF, !UNDEF)
  3336.  
  3337.  The !IFDEF and !IFNDEF directives test whether a macro is defined and
  3338.  execute a block of statements depending on the result. You use these two
  3339.  directives with the !ELSE and !ENDIF directives to construct conditional
  3340.  blocks, as described in the previous section.
  3341.  
  3342.  The description block below shows the use of !IFDEF and !IFNDEF directives:
  3343.  
  3344.  
  3345.    $(target) : picture.obj fileio.obj error.obj
  3346.    # Macro $(newlib) is defined to use new pix.lib
  3347.    !IFDEF newlib
  3348.     QLINK $**,$(target),,pix.lib;
  3349.    !ELSE
  3350.    # Just link with existing version
  3351.     QLINK $**,$(target),,\mylibs\pix.lib;
  3352.    !ENDIF
  3353.  
  3354.  When NMAKE encounters the !IFDEF directive, it checks whether or not  newlib
  3355.   has been defined. If so, it executes the QLINK command on the next line. If
  3356.  not, it executes the QLINK command following the !ELSE directive.
  3357.  
  3358.  NMAKE considers a macro to be defined if its name appears to the left of an
  3359.  equal sign anywhere in the description file or on the NMAKE command line.
  3360.  So, if the MAKEFILE file contains the above description, both of the
  3361.  commands below would result in execution of the statements following the
  3362.  !IFDEF directive:
  3363.  
  3364.    NMAKE newlib=true target=eliot.exe
  3365.  
  3366.    NMAKE newlib= target=eliot.exe
  3367.  
  3368.  Even though the second command line sets  newlib  to the null string,
  3369.  newlib  is still considered defined because its name appears to the left of
  3370.  the equal sign.
  3371.  
  3372.  The !IFNDEF directive acts in exactly the same way as !IFDEF, except that
  3373.  the statements following it are executed only if the macro is not defined.
  3374.  
  3375.  Once you have defined a macro, the only way to remove its definition is to
  3376.  use the !UNDEF directive. You might want to remove a macro definition before
  3377.  including another file, as in the following example:
  3378.  
  3379.    !UNDEF opts
  3380.    !INCLUDE newlib.mak
  3381.  
  3382.  The !UNDEF directive ensures that the macro  opts  is not defined when the
  3383.  file NEWLIB.MAK is processed.
  3384.  
  3385.  
  3386.  3.5.4.4  The !ERROR Directive
  3387.  
  3388.  The !ERROR directive causes NMAKE to print some text, then quit processing
  3389.  the description file. This directive is commonly used in conditionals to
  3390.  terminate execution when fatal errors occur. For example, when NMAKE comes
  3391.  across the conditional
  3392.  
  3393.    !IF "$(continue)" == "n"
  3394.    !ERROR  Could not continue because of errors.
  3395.    !ELSE
  3396.     QLINK $**, $@;
  3397.    !ENDIF
  3398.  
  3399.  it tests the value of the  continue  macro. If  continue  holds the string
  3400.  "n", NMAKE displays the text that follows the !ERROR directive then stops
  3401.  execution. If  continue  holds any other value, NMAKE executes the QLINK
  3402.  command that follows the !ELSE directive.
  3403.  
  3404.  
  3405.  3.6  Other NMAKE Features
  3406.  
  3407.  This chapter has covered a subset of NMAKE designed to get you started. In
  3408.  addition to having the features described in this chapter, the NMAKE utility
  3409.  lets you
  3410.  
  3411.  
  3412.    ■   Specify additional command-line options
  3413.  
  3414.    ■   Specify more than one set of dependents for a target
  3415.  
  3416.    ■   Create description files that build more than one target, and specify
  3417.        the target to build at invocation
  3418.  
  3419.    ■   Use additional predefined macros
  3420.  
  3421.    ■   Substitute text within macros
  3422.  
  3423.    ■   Use additional directives
  3424.  
  3425.    ■   Generate response files for use with other programs
  3426.  
  3427.    ■   Use predefined pseudotargets, which provide special rules and
  3428.        information
  3429.  
  3430.  
  3431.  As you become more familiar with NMAKE, and as your software projects grow,
  3432.  you will probably need to use some of these features. See Chapter 7 for more
  3433.  information.
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  PART II  Reference to QuickC Tools
  3441.  ────────────────────────────────────────────────────────────────────────────
  3442.  
  3443.  Part 2 of the QuickC Tool Kit is a reference to the tools. Here you will
  3444.  find complete information on all the options of the utilities. Refer to Part
  3445.  2 when you have a specific question about one of the tools or when you've
  3446.  gained experience with the utilities and need to know more about them.
  3447.  
  3448.  The QCL, LINK, LIB, and NMAKE utilities are covered in greater detail in
  3449.  Part 2 than in Part 1. In particular, these chapters describe additional
  3450.  options that work with programs written in other languages (such as Pascal,
  3451.  FORTRAN, and assembler) or with special hardware.
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  Chapter 4  QCL Command Reference
  3459.  ────────────────────────────────────────────────────────────────────────────
  3460.  
  3461.  This chapter describes in detail the QCL command, which you can use to
  3462.  compile and link QuickC Compiler programs. It explains the rules for giving
  3463.  input on the QCL command line, describes the options to QCL in alphabetical
  3464.  order, and shows how to change the stack space allocated to a program.
  3465.  
  3466.  The chapter provides reference material for programmers who are familiar
  3467.  with the Microsoft QuickC Compiler in general and the QCL command in
  3468.  particular. If you are new to the QuickC Compiler, see Chapter 1, "Creating
  3469.  Executable Programs," in Part 1 of this manual for an introductory approach.
  3470.  
  3471.  
  3472.  
  3473.  4.1  The QCL Command Line
  3474.  
  3475.  The QCL command line has the following format:
  3476.  
  3477.    QCL «option...» file... «option|file»... «/link «lib... link-opt...» »
  3478.  
  3479.  The following list describes input to the QCL command:
  3480.  
  3481.  Entry                             Meaning
  3482.  ────────────────────────────────────────────────────────────────────────────
  3483.  option                            One or more QCL options; see Section 4.3,
  3484.                                    "QCL Options," for descriptions.
  3485.  
  3486.  file                              The name of one or more source files,
  3487.                                    object files, or libraries. You must
  3488.                                    specify at least one file name. QCL
  3489.                                    compiles source files and passes the
  3490.                                    names of the object files and libraries
  3491.                                    to the linker.
  3492.  
  3493.  lib                               One or more library names. QCL passes
  3494.                                    the names of these libraries to the
  3495.                                    linker for processing.
  3496.  
  3497.  link-opt                          One or more of the linker options
  3498.                                    described in
  3499.                                    Chapter 5, "QLINK." The QCL command
  3500.                                    passes
  3501.                                    these options to the linker for
  3502.                                    processing.
  3503.  
  3504.   Maximum command-line length
  3505.  
  3506.  You can specify any number of options, file names, and library names, as
  3507.  long as the length of the command line does not exceed 128 characters.
  3508.  
  3509.   Specifying file names
  3510.  
  3511.  Any combination of uppercase and lowercase letters is legal in file names.
  3512.  Any file name can include a full or partial path name. A full path name
  3513.  includes a drive name and one or more directory names. A partial path name
  3514.  omits the drive name, which QCL assumes to be the current drive. If you
  3515.  don't specify any path name, QCL assumes the file is in the current
  3516.  directory.
  3517.  
  3518.  QCL determines how to process each file depending on its file-name
  3519.  extension, as follows:
  3520.  
  3521.  Extension                         Processing
  3522.  ────────────────────────────────────────────────────────────────────────────
  3523.  .C                                QCL assumes the file is a C source file
  3524.                                    and compiles it.
  3525.  
  3526.  .OBJ                              QCL assumes the file is an object file
  3527.                                    and passes its name to the linker.
  3528.  
  3529.  .LIB                              QCL assumes the file is a library and
  3530.                                    passes its name to the linker. The
  3531.                                    linker links this library with the
  3532.                                    object files QCL created from source
  3533.                                    files and the object files given on the
  3534.                                    command line.
  3535.  
  3536.  Any other extension               QCL assumes the file is an object file
  3537.  or no extension                   and passes its name to the linker.
  3538.  
  3539.  
  3540.  4.2  How the QCL Command Works
  3541.  
  3542.  The QCL command follows the procedure described below to create an
  3543.  executable file from one or more C source files:
  3544.  
  3545.  
  3546.    1.  QCL compiles each source file, creating an object file for each. In
  3547.        each object file, QCL places the name of the appropriate standard
  3548.        combined library. The memory model and floating-point-math package
  3549.        used to compile the program determine this library name. See Section
  3550.        4.3.1, "/A Options," for more information on the library names.
  3551.  
  3552.    2.  QCL invokes the linker, passing the names of the object files it has
  3553.        created plus any object files or libraries given on the command line.
  3554.        QCL also specifies the options listed in the LINK environment
  3555.        variable. If you use /link to specify linker options on the QCL
  3556.        command line, these options apply as well. If conflicts occur, options
  3557.        that follow /link override those in the LINK environment variable.
  3558.  
  3559.    3.  The linker links the object files and libraries named by QCL to create
  3560.        a single executable file.
  3561.  
  3562.        Before it creates the executable file, the linker resolves "external
  3563.        references" in the object files. An external reference is a function
  3564.        call in one object file that refers to a function defined in another
  3565.        object file or in a library. To resolve an external reference, the
  3566.        linker searches for the called function in the following locations in
  3567.        the order shown:
  3568.  
  3569.  
  3570.  
  3571.    a.  The object files passed by QCL
  3572.  
  3573.    b.  The libraries given on the QCL command line, if any
  3574.  
  3575.    c.  The libraries named in the object files
  3576.  
  3577.  
  3578.  
  3579.  Example
  3580.  
  3581.  Assume that you are compiling three C source files: MAIN.C, MOD1.C, and
  3582.  MOD2.C. Each file includes a call to a function defined in a different file:
  3583.  
  3584.  
  3585.  
  3586.    ■   MAIN.C calls the function named  mod1()  in MOD1.C and the function
  3587.        named  mod2()  in MOD2.C.
  3588.  
  3589.    ■   MOD1.C calls the standard-library functions printf and scanf.
  3590.  
  3591.    ■   MOD2.C calls graphics functions named  myline()  and  mycircle(),
  3592.        which are defined in a library named MYGRAPH.LIB.
  3593.  
  3594.  
  3595.  First, compile with a command line of the following form:
  3596.  
  3597.    QCL MAIN.C MOD1.C MOD2.C /link MYGRAPH.LIB
  3598.  
  3599.  QCL first compiles the C source files and creates the object files MAIN.OBJ,
  3600.  MOD1.OBJ, and MOD2.OBJ. QCL then places the name of the standard library
  3601.  SLIBCE.LIB in each object file.
  3602.  
  3603.  Next, QCL passes the names of the C source files to the linker. Finally, the
  3604.  linker resolves the external references as follows:
  3605.  
  3606.  
  3607.    1.  In MAIN.OBJ, the reference to the  mod1()  function is resolved using
  3608.        the definition in MOD1.OBJ and the reference to the  mod2()  function
  3609.        is resolved using the definition in MOD2.OBJ.
  3610.  
  3611.    2.  In MOD1.OBJ, the references to printf and scanf are resolved using the
  3612.        definitions in SLIBCE.LIB. The linker uses this library because it
  3613.        finds the library name within MOD1.OBJ.
  3614.  
  3615.    3.  In MOD2.OBJ, the references to myline and mycircle are resolved using
  3616.        the definitions in MYGRAPH.LIB.
  3617.  
  3618.  
  3619.  
  3620.  4.3  QCL Options
  3621.  
  3622.  Options to the QCL command consist of either a forward slash ( / ) or a dash
  3623.  (-) followed by one or more letters. Certain QCL options take arguments; in
  3624.  some of these options, a space is required between the option and the
  3625.  argument, and in others, no space is allowed. The spacing rules for the
  3626.  options are given in their descriptions.
  3627.  
  3628.  ────────────────────────────────────────────────────────────────────────────
  3629.  Important
  3630.  QCL options (except for the /HELP option) are case-sensitive. For example,
  3631.  /C and /c are two different options.
  3632.  ────────────────────────────────────────────────────────────────────────────
  3633.  
  3634.   Command-line order
  3635.  
  3636.  Options can appear anywhere on the QCL command line. With a few exceptions
  3637.  (/c, /Fe), each QCL option applies to the files that follow it on the
  3638.  command line and does not affect files preceding it on the command line.
  3639.  
  3640.  You can also define QCL options in the CL environment variable; these
  3641.  options are used every time you invoke QCL. (See Section 4.3.41, "Giving
  3642.  Options with the CL Environment Variable.")
  3643.  
  3644.  The remainder of this section describes all the QCL options in alphabetical
  3645.  order. If an option can take one or more arguments, its format is shown
  3646.  under an "Option" heading before its description. See Chapter 1, "Creating
  3647.  Executable Programs," for descriptions of the various categories of QCL
  3648.  options and the more commonly used options belonging to each category.
  3649.  
  3650.  
  3651.  4.3.1  /A Options (Memory Models)
  3652.  
  3653.  Every program's code and data are stored in blocks called "segments." The
  3654.  memory model of the program determines the organization of these segments.
  3655.  (See Section 4.3.26 and Appendix B for more information on segments.) The
  3656.  
  3657.  memory model also determines what kind of executable file is generated. All
  3658.  models produce a .EXE file, except for the tiny model which produces a .COM
  3659.  file. QCL offers the memory-model options described in Table 4.1.
  3660.  
  3661.  
  3662.  Table 4.1  Memory Models
  3663.  
  3664. ╓┌───────────┌─────────────┌──────────────┌──────────────┌───────────────────╖
  3665.  QCL         Memory        Data           Code           Long
  3666.  Option      Model         Segments       Segments       Form
  3667.  ────────────────────────────────────────────────────────────────────────────
  3668.  /AT         Tiny          One segment    One segment    none
  3669.                            for both data  for both data
  3670.                            and code       and code
  3671.  
  3672.  /AS         Small         One            One            /Asnd
  3673.  
  3674.  /AM         Medium        One            One code       /Alnd
  3675.                                           segment per
  3676.                                           module
  3677.  QCL         Memory        Data           Code           Long
  3678.  Option      Model         Segments       Segments       Form
  3679.  ────────────────────────────────────────────────────────────────────────────
  3680.                                          module
  3681.  
  3682.  /AC         Compact       Multiple data  One            /Asfd
  3683.                            segments;
  3684.                            data items
  3685.                            must be
  3686.                            smaller than
  3687.                            64K
  3688.  
  3689.  /AL         Large         Multiple data  One code       /Alfd
  3690.                            segments;      segment per
  3691.                            data items     module
  3692.                            must be
  3693.                            smaller than
  3694.                            64K
  3695.  
  3696.  /AH         Huge          Multiple data  One code       /Alhd
  3697.                            segments;      segment per
  3698.  QCL         Memory        Data           Code           Long
  3699.  Option      Model         Segments       Segments       Form
  3700.  ────────────────────────────────────────────────────────────────────────────
  3701.                           segments;      segment per
  3702.                            data items     module
  3703.                            can be larger
  3704.                            than 64K
  3705.  
  3706.  ────────────────────────────────────────────────────────────────────────────
  3707.  
  3708.  
  3709.  
  3710.   Default memory model
  3711.  
  3712.  By default, the QuickC compiler uses the small memory model.
  3713.  
  3714.   Uses of memory models
  3715.  
  3716.  Generally, memory models with multiple code segments can accommodate larger
  3717.  programs than can memory models with one code segment. Also, memory models
  3718.  with multiple data segments can accommodate more data-intensive programs
  3719.  than can memory models with one data segment. Programs with multiple code or
  3720.  data segments, however, are usually slower than programs with a single code
  3721.  or data segment. It is often more efficient to compile with the smallest
  3722.  possible memory model and use the near, far, and huge keywords to override
  3723.  the default addressing conventions for any data items or functions that
  3724.  can't be accommodated in that model. (Consult Appendix B for more
  3725.  information about these keywords and their interactions with standard memory
  3726.  models.)
  3727.  
  3728.   Customized memory models
  3729.  
  3730.  QCL also supports customized memory models, in which different features from
  3731.  standard memory models are combined. You specify a customized memory model
  3732.  with the /Astring option, where string is composed of three letters that
  3733.  specify the code pointer size, the data pointer size, and the stack and data
  3734.  segment setup, respectively. All three letters must be present, but they can
  3735.  appear in any order. The allowable letters appear in Table 4.2.
  3736.  
  3737.  Table 4.2  Customized Memory Model Codes
  3738.  
  3739. ╓┌───────────────┌─────────┌─────────────────────────────────────────────────╖
  3740.  Group           Code      Description
  3741.  ────────────────────────────────────────────────────────────────────────────
  3742.  Code pointers   s         Small
  3743.                  l         Large
  3744.  
  3745.  Data pointers   n         Near
  3746.                  f         Far
  3747.                  h         Huge
  3748.  
  3749.  Segment setup   d         SS == DS
  3750.                  u         SS != DS; DS loaded for each function entry
  3751.                  w         SS != DS; DS not loaded at function entry
  3752.  
  3753.  ────────────────────────────────────────────────────────────────────────────
  3754.  
  3755.  
  3756.  
  3757.  As examples, the customized representations of the standard memory models
  3758.  appear in the last column of Table 4.1.
  3759.  
  3760.  The segment setup codes can also be given as separate options, when used to
  3761.  modify a standard memory model. For example, the options /AS /Au specify the
  3762.  small model, plus they force DS to be loaded at function entry.
  3763.  
  3764.   Memory models  and default libraries
  3765.  
  3766.  The memory-model and math options used to compile the program determine the
  3767.  library that the linker searches to resolve external references. The library
  3768.  name is mLIBCf.LIB, where the memory-model option determines m: S for small
  3769.  (default) or tiny model, M for medium model, C for compact model, or L for
  3770.  large or huge model. The math option (see Section 4.3.12, "/FP Options")
  3771.  determines f: E for emulator (default) or 7 for 8087/80287 option.
  3772.  
  3773.  
  3774.  4.3.2  /batch (Compile in Batch Mode)
  3775.  
  3776.  The /batch option assumes that QCL is being executed from a batch file.
  3777.  Normally, if QCL cannot find one of the programs needed to complete the
  3778.  compilation, it displays a prompt requesting that the appropriate disk be
  3779.  inserted. If you specify the /batch option, QCL simply terminates
  3780.  compilation with an error.
  3781.  
  3782.  
  3783.  4.3.3  /c (Compile without Linking)
  3784.  
  3785.  The /c option tells the QCL command to compile all C source files given on
  3786.  the command line, creating object files, but not to link the object files.
  3787.  QCL does not produce an executable file. Regardless of its position on the
  3788.  command line, this option applies to all source files on the command line.
  3789.  
  3790.  
  3791.  Example
  3792.  
  3793.    QCL FIRST.C SECOND.C /c THIRD.OBJ
  3794.  
  3795.  This example compiles FIRST.C, creating the object file FIRST.OBJ, and
  3796.  SECOND.C, creating the object file SECOND.OBJ. No processing is performed
  3797.  with THIRD.OBJ because QCL skips the linking step.
  3798.  
  3799.  
  3800.  4.3.4  /C (Preserve Comments during Preprocessing)
  3801.  
  3802.  The /C (for "comment") option preserves comments during preprocessing. If
  3803.  you don't specify this option, the preprocessor strips comments from a
  3804.  source file since they do not serve any purpose in later stages of
  3805.  compiling.
  3806.  
  3807.  This option is valid only if the /E, /P, or /EP option is also used.
  3808.  
  3809.  
  3810.  Example
  3811.  
  3812.    QCL /P /C SAMPLE.C
  3813.  
  3814.  This example produces a listing named SAMPLE.I. The listing file contains
  3815.  the original source file, including comments, with all preprocessor
  3816.  directives expanded or replaced.
  3817.  
  3818.  
  3819.  4.3.5  /D (Define Constants and Macros)
  3820.  
  3821.  
  3822.  Option
  3823.  
  3824.    /D identifier  «=«{string|number}»»
  3825.  
  3826.  Use the /D option to define constants or macros for your source file.
  3827.  
  3828.  The identifier is the name of the constant or macro. It may be defined as a
  3829.  string or as a number. The string must be enclosed in quotes if it includes
  3830.  spaces.
  3831.  
  3832.  If you leave out both the equal sign and the string or number, the
  3833.  identifier is assumed to be defined, and its value is set to 1. For example,
  3834.   /DSET  is sufficient to define a macro named  SET  with a value of 1.
  3835.  
  3836.  Use the /D option in combination with the #if directive to conditionally
  3837.  compile source files.
  3838.  
  3839.   Removing definitions
  3840.  
  3841.  If you have defined a numeric constant, using the equal sign with no number
  3842.  removes the definition of that constant from the source file. For example,
  3843.  to remove all occurrences of  RELEASE, use the following option:
  3844.  
  3845.    /DRELEASE=
  3846.  
  3847.  Note that the identifier argument is case sensitive. For example, the /D
  3848.  option above would have no effect on a constant named  release  that is
  3849.  defined in the source file.
  3850.  
  3851.  Defining macros and constants with the /D option has the same effect as
  3852.  using a #define preprocessor directive at the beginning of your source file.
  3853.  The identifier is defined until either an #undef directive in the source
  3854.  file removes the definition or the compiler reaches the end of the file.
  3855.  
  3856.   Duplicate definitions
  3857.  
  3858.  If an identifier defined in a /D option is also defined within the source
  3859.  file, QCL uses the definition on the command line until it encounters the
  3860.  redefinition of the identifier in the source file, as illustrated in Figure
  3861.  4.1.
  3862.  
  3863.  (This figure may be found in the printed book.)
  3864.  
  3865.  The /D option has the same effect as the Define text box in the QuickC
  3866.  environment.
  3867.  
  3868.  
  3869.  Example
  3870.  
  3871.    #if !defined(RELEASE)
  3872.     _nheapchk();
  3873.    #endif
  3874.  
  3875.  This code fragment calls a function to check the near heap unless the
  3876.  constant  RELEASE  is defined. While the program is under development, you
  3877.  can leave  RELEASE  undefined and perform heap checking to find bugs.
  3878.  Assuming the program name is BIG.C, you would compile with the following
  3879.  command:
  3880.  
  3881.    QCL BIG.C
  3882.  
  3883.  After you have found all of the bugs in the program, you can define  RELEASE
  3884.   in a /D option so that the program will run faster, as follows:
  3885.  
  3886.    QCL /DRELEASE BIG.C
  3887.  
  3888.  
  3889.  4.3.6  /E (Copy Preprocessor Output to Standard Output)
  3890.  
  3891.  The /E option copies output from the preprocessor to the standard output
  3892.  (usually your terminal). This output is identical to the original source
  3893.  file except that all
  3894.  
  3895.  preprocessor directives are carried out, macro expansions are performed, and
  3896.  comments are removed. You normally use the /E option with the /C option (see
  3897.  Section 4.3.4), which preserves comments in the preprocessed output. DOS
  3898.  redirection can be used to save the output in a disk file.
  3899.  
  3900.  The /E option also places a #line directive at the beginning and end of each
  3901.  included file and around lines removed by preprocessor directives that
  3902.  specify conditional compilation.
  3903.  
  3904.  Use this option when you want to resubmit the preprocessed listing for
  3905.  compilation. The #line directives renumber the lines of the preprocessed
  3906.  file so that errors generated during later stages of processing refer to the
  3907.  line numbers of the original source file rather than to the preprocessed
  3908.  file.
  3909.  
  3910.  The /E option suppresses compilation. QCL does not produce an object file or
  3911.  map file, even if you specify the /Fo or /Fm option on the QCL command line.
  3912.  
  3913.  
  3914.  
  3915.  Example
  3916.  
  3917.    QCL /E /C ADD.C > PREADD.C
  3918.  
  3919.  The command above creates a preprocessed file with inserted #line directives
  3920.  from the source file ADD.C. The output is redirected to the file PREADD.C.
  3921.  
  3922.  
  3923.  4.3.7  /EP (Copy Preprocessor Output to Standard Output)
  3924.  
  3925.  
  3926.  The /EP option is similar to the /E option: it preprocesses the C source
  3927.  file and copies preprocessor output to the standard output. Unlike the /E
  3928.  option, however, the /EP option does not add #line directives to the output.
  3929.  
  3930.  
  3931.  Preprocessed output is identical to the original source file except that all
  3932.  preprocessor directives are carried out, macro expansions are performed, and
  3933.  comments are removed. You can use the /EP option with the /C option (see
  3934.  Section 4.3.4), which preserves comments in the preprocessed output.
  3935.  
  3936.  The /EP option suppresses compilation; QCL does not produce an object file
  3937.  or map file, even if you specify the /Fo or /Fm option on the QCL command
  3938.  line.
  3939.  
  3940.  
  3941.  Example
  3942.  
  3943.    QCL /EP /C ADD.C
  3944.  
  3945.  The command above creates a preprocessed file from the source file ADD.C. It
  3946.  preserves comments but does not insert #line directives. The output appears
  3947.  on the screen.
  3948.  
  3949.  
  3950.  4.3.8  /F (Set Stack Size)
  3951.  
  3952.  
  3953.  Option
  3954.  
  3955.    /F number
  3956.  
  3957.  The /F option sets the program stack size to number bytes, where number is a
  3958.  hexadecimal number in the range 0001 to FFFF. Decimal and octal numbers are
  3959.  not allowed. If you don't specify this option, a stack size of 2K is used by
  3960.  default.
  3961.  
  3962.  You may want to increase the stack size if your program gets stack-overflow
  3963.  diagnostic messages. Conversely, if your program uses the stack very little,
  3964.  you may want to decrease the size of your program by reducing the stack
  3965.  size. In general, if you modify the stack size, do not use the /Gs option to
  3966.  suppress stack checking.
  3967.  
  3968.  
  3969.  4.3.9  /Fe (Rename Executable File)
  3970.  
  3971.  
  3972.  Option
  3973.  
  3974.    /Feexefile
  3975.  
  3976.  By default, QCL names the executable file with the base name of the first
  3977.  file (source or object) on the command line plus the extension .EXE. The /Fe
  3978.  option lets you give the executable file a different name or create it in a
  3979.  different directory.
  3980.  
  3981.  Because QCL creates only one executable file, you can give the /Fe option
  3982.  anywhere on the command line. If more than one /Fe option appears, QCL gives
  3983.  the executable file the name specified in the last /Fe option on the command
  3984.  line.
  3985.  
  3986.  The /Fe option applies only in the linking stage. If you specify the /c
  3987.  option to suppress linking, /Fe has no effect.
  3988.  
  3989.   Path names and extensions
  3990.  
  3991.  The exefile argument must appear immediately after the option with no
  3992.  intervening spaces. The exefile argument can be a file specification, a
  3993.  drive name, or a path specification. If exefile is a drive name or path
  3994.  specification, the QCL command creates the executable file in the given
  3995.  location, using the default name (base name of the first file plus .EXE). A
  3996.  path specification must end with a backslash ( \ ) so that QCL can
  3997.  distinguish it from an ordinary file name.
  3998.  
  3999.  You are free to supply any name and any extension you like for exefile. If
  4000.  you give a file name without an extension, QCL automatically appends the
  4001.  .EXE extension.
  4002.  
  4003.  
  4004.  Examples
  4005.  
  4006.    QCL /FeC:\BIN\PROCESS *.C
  4007.  
  4008.  The example above compiles and links all source files with the extension .C
  4009.  in the current directory. The resulting executable file is named PROCESS.EXE
  4010.  and is created in the directory C:\BIN.
  4011.  
  4012.    QCL /FeC:\BIN\ *.C
  4013.  
  4014.  The preceding example is similar to the first example except that the
  4015.  executable file, instead of being named PROCESS.EXE, is given the same base
  4016.  name as the first file compiled. The executable file is created in the
  4017.  directory C:\BIN.
  4018.  
  4019.  
  4020.  4.3.10  /Fm (Create Map File)
  4021.  
  4022.  
  4023.  Option
  4024.  
  4025.    /Fm «mapfile»
  4026.  
  4027.  The /Fm option produces a map file. The map file contains a list of segments
  4028.  in order of their appearance within the load module.
  4029.  
  4030.   Path names and extensions
  4031.  
  4032.  The mapfile argument must follow the /Fm option immediately with no
  4033.  intervening spaces. The mapfile can be a file specification, a drive name,
  4034.  or a path specification. It can also be omitted.
  4035.  
  4036.  If you give just a path specification as the mapfile argument, the path
  4037.  specification must end with a backslash ( \ ) so that QCL can distinguish it
  4038.  from an ordinary file name. For example, to create a map file in the path
  4039.  C:\LIST, the appropriate /Fm option is /FmC:\LIST\ .
  4040.  
  4041.  If you do not specify a name for the map file or if you supply only a drive
  4042.  name or path, QCL uses the base name of the first source or object file on
  4043.  the command line plus the extension .MAP.
  4044.  
  4045.  A fragment of a sample map file is shown below:
  4046.  
  4047.    Start  Stop   Length Name                   Class
  4048.    00000H 01E9FH 01EA0H _TEXT                  CODE
  4049.    01EA0H 01EA0H 00000H C_ETEXT                ENDCODE
  4050.    .
  4051.    .
  4052.    .
  4053.  
  4054.   Segment information
  4055.  
  4056.  The information in the  Start  and  Stop  columns shows the 20-bit address
  4057.  (in hexadecimal) of each segment, relative to the beginning of the load
  4058.  module. The load module begins at location zero. The  Length  column gives
  4059.  the length of the segment in bytes. The  Name  column gives the name of the
  4060.  segment, and the  Class  column gives information about the segment type.
  4061.  
  4062.   Group information
  4063.  
  4064.  The starting address and name of each group appear after the list of
  4065.  segments. A sample group listing is shown below:
  4066.  
  4067.    Origin   Group
  4068.    01EA:0   DGROUP
  4069.  
  4070.  In this example, DGROUP is the name of the data group. DGROUP is used for
  4071.  all near data (that is, all data not explicitly or implicitly placed in
  4072.  their own data segment) in Microsoft QuickC programs.
  4073.  
  4074.   Global symbols
  4075.  
  4076.  The map file shown below contains two lists of global symbols: the first
  4077.  list is sorted in ASCII-character order by symbol name and the second is
  4078.  sorted by symbol address. The notation  Abs  appears next to the names of
  4079.  absolute symbols (symbols containing 16-bit constant values that are not
  4080.  associated with program addresses).
  4081.  
  4082.    Address         Publics by Name
  4083.  
  4084.    01EA:0096       STKHQQ
  4085.    0000:1D86       _brkctl
  4086.    01EA:04B0       _edata
  4087.    01EA:0910       _end
  4088.    .
  4089.    .
  4090.    .
  4091.    01EA:00EC       __abrkp
  4092.    01EA:009C       __abrktb
  4093.    01EA:00EC       __abrktbe
  4094.    0000:9876  Abs  __acrtmsg
  4095.    0000:9876  Abs  __acrtused
  4096.    .
  4097.    .
  4098.    .
  4099.    01EA:0240       ___argc
  4100.    01EA:0242       ___argv
  4101.  
  4102.    Address         Publics by Value
  4103.  
  4104.    0000:0010       _main
  4105.    0000:0047       _htoi
  4106.    0000:00DA       _exp16
  4107.    0000:0113       __chkstk
  4108.    0000:0129       __astart
  4109.    0000:01C5       __cintDIV
  4110.    .
  4111.    .
  4112.    .
  4113.  
  4114.  Global symbols in a map file usually have one or more leading underscores
  4115.  because the QuickC compiler adds an underscore to the beginning of variable
  4116.  names. Many of the global symbols that appear in the map file are symbols
  4117.  used internally by the QuickC compiler and the standard libraries.
  4118.  
  4119.  The addresses of the external symbols show the location of the symbol
  4120.  relative to zero (the beginning of the load module).
  4121.  
  4122.   Program entry point
  4123.  
  4124.  Following the lists of symbols, the map file gives the program entry point,
  4125.  as shown in the following example:
  4126.  
  4127.    Program entry point at 0000:0129
  4128.  
  4129.  ────────────────────────────────────────────────────────────────────────────
  4130.  NOTE
  4131.  If you use the /Fm option with the /Gi option (for incremental compilation),
  4132.  QCL produces a segmented-executable map file rather than a DOS executable
  4133.  map file. The segment addresses in the file are different from those in DOS
  4134.  map files, and the file itself has a different format.
  4135.  ────────────────────────────────────────────────────────────────────────────
  4136.  
  4137.  
  4138.  4.3.11  /Fo (Rename Object File)
  4139.  
  4140.  
  4141.  Option
  4142.  
  4143.    /Foobjfile
  4144.  
  4145.  By default, QCL gives each object file it creates the base name of the
  4146.  corresponding source file plus the extension .OBJ. The /Fo option lets you
  4147.  give different names to object files or create them in a different
  4148.  directory. If you are compiling more than one source file, you can use the
  4149.  /Fo option with each source file to rename the corresponding object file.
  4150.  
  4151.  Keep the following rules in mind when using this option:
  4152.  
  4153.  
  4154.    ■   The objfile argument must appear immediately after the option, with no
  4155.        intervening spaces.
  4156.  
  4157.    ■   Each /Fo option applies only to the next source file on the command
  4158.        line.
  4159.  
  4160.  
  4161.   Path names and extensions
  4162.  
  4163.  You are free to supply any name and any extension you like for objfile.
  4164.  However, it is recommended that you use the conventional .OBJ extension
  4165.  since the linker and the LIB library manager use .OBJ as the default
  4166.  extension when processing object files.
  4167.  
  4168.  If you do not give a complete object-file name with the /Fo option (that is,
  4169.  if you do not give an object-file name with a base and an extension), QCL
  4170.  names the object file according to the following rules:
  4171.  
  4172.  
  4173.    ■   If you give an object-file name without an extension (such as TEST),
  4174.        QCL automatically appends the .OBJ extension.
  4175.  
  4176.    ■   If you give an object-file name with a blank extension (such as
  4177.        TEST.), QCL leaves the extension blank.
  4178.  
  4179.    ■   If you give only a drive or directory specification following the /Fo
  4180.        option, QCL creates the object file on that drive or directory and
  4181.        uses the default file name (the base name of the source file plus
  4182.        .OBJ).
  4183.  
  4184.  
  4185.  You can use this option to create the object file in another directory or on
  4186.  another disk. When you give only a directory specification, the directory
  4187.  specification must end with a backslash ( \ ) so that QCL can distinguish
  4188.  between a directory specification and a file name.
  4189.  
  4190.  
  4191.  Examples
  4192.  
  4193.    QCL /FoB:\OBJECT\ THIS.C
  4194.  
  4195.  In the example above, QCL compiles the source file THIS.C and gives the
  4196.  resulting object file the name THIS.OBJ (by default). The directory
  4197.  specification B: \OBJECT\ tells QCL to create THIS.OBJ in the directory
  4198.  named \OBJECT on drive B.
  4199.  
  4200.    QCL /Fo\OBJECT\ THIS.C THAT.C /Fo\SRC\NEWTHOSE.OBJ THOSE.C
  4201.  
  4202.  In the example above, the first /Fo option tells the compiler to create the
  4203.  object file THIS.OBJ (the result of compiling THIS.C) in the \OBJECT
  4204.  directory. The second /Fo option tells the compiler to create the object
  4205.  file NEWTHOSE.OBJ (the result of compiling THOSE.C) in the \SRC directory.
  4206.  The compiler also creates the object file THAT.OBJ (the result of compiling
  4207.  THAT.C) in the current directory.
  4208.  
  4209.  
  4210.  4.3.12  /FP Options (Select Floating-Point-Math Package)
  4211.  
  4212.  The /FPi and /FPi87 options specify how your program handles
  4213.  floating-point-math operations.
  4214.  
  4215.  
  4216.  4.3.12.1  /FPi (Emulator)
  4217.  
  4218.  
  4219.  Use the /FPi option if you do not know whether an 8087 or 80287 math
  4220.  coprocessor will be available at run time. Programs compiled with /FPi work
  4221.  as follows:
  4222.  
  4223.  
  4224.    ■   If a coprocessor is present at run time, the program uses the
  4225.        coprocessor.
  4226.  
  4227.    ■   If no coprocessor is present or if the NO87 environment variable has
  4228.        been set, the program uses the emulator.
  4229.  
  4230.  
  4231.  The /FPi option generates in-line instructions for an 8087 or 80287
  4232.  coprocessor and places the name of the emulator library (mLIBCE.LIB) in the
  4233.  object file. At link time, you can specify an 8087/80287 library
  4234.  (mLIBC7.LIB) instead. If you do not choose a floating-point option, QCL uses
  4235.  the /FPi option by default.
  4236.  
  4237.   Interrupt fixups
  4238.  
  4239.  This option works whether or not a coprocessor is present because the QuickC
  4240.  compiler does not generate "true" in-line 8087/80287 instructions. Instead,
  4241.  it generates software interrupts to library code. The library code, in turn,
  4242.  fixes up the interrupts to use either the emulator or the coprocessor,
  4243.  depending on whether a coprocessor is present. The fixups can be removed by
  4244.  linking the file RMFIXUP.OBJ with the C program. Linking this file with
  4245.  QuickC programs can save execution time (the time required to fix up all the
  4246.  interrupts the first time). However, a C program linked with RMFIXUP.OBJ
  4247.  will run only if a coprocessor is present.
  4248.  
  4249.  
  4250.  4.3.12.2  /FPi87 (Coprocessor)
  4251.  
  4252.  The /FPi87 option includes the name of an 8087/80287 library (mLIBC7.LIB) in
  4253.  the object file. At link time, you can override this option and specify an
  4254.  emulator library (mLIBCE.LIB) instead so that the program will run on
  4255.  computers without coprocessors.
  4256.  
  4257.  
  4258.  If you use the /FPi87 option and link with mLIBC7.LIB, an 8087 or 80287
  4259.  coprocessor must be present at run time; otherwise, the program fails and
  4260.  the following error message is displayed:
  4261.  
  4262.    run-time error R6002
  4263.    - floating point not loaded
  4264.  
  4265.  If you compile with /FPi87 and link with mLIBCE.LIB, you can set the NO87
  4266.  environment variable to suppress the use of the coprocessor (see Section
  4267.  4.3.12.5).
  4268.  
  4269.  Compiling with the /FPi87 option results in the smallest, fastest programs
  4270.  possible for handling floating-point arithmetic.
  4271.  
  4272.  
  4273.  4.3.12.3  Library Considerations for Floating-Point Options
  4274.  
  4275.  You may want to use libraries in addition to the default library for the
  4276.  floating-point option you have chosen on the QCL command line. For example,
  4277.  you may want to create your own libraries or object files, then link them at
  4278.  a later time with object files that you have compiled using different QCL
  4279.  options.
  4280.  
  4281.  You must be sure that you use only one standard combined C library when you
  4282.  link. You can control which library QLINK uses in one of two ways:
  4283.  
  4284.  
  4285.    1.  Make sure the first object file passed to the linker has the name of
  4286.        the desired library. For example, if you want to use an 8087/80287
  4287.        library, give the /FPi87 option before the first source-file name on
  4288.        the QCL command line; or, give the name of an object file compiled
  4289.        with /FPi87 as the first file name on the command line. All
  4290.        floating-point calls in this object file refer to the 8087/80287
  4291.        library.
  4292.  
  4293.    2.  Give the /NOD (no default-library search) option after the /link
  4294.        option on the QCL command line. Then specify the name of the library
  4295.        you want to use on the QCL command line. The /NOD option overrides the
  4296.        library names embedded in the object files. Because the linker
  4297.        searches libraries given on the command line before it searches
  4298.        libraries named in object files, all floating-point calls will refer
  4299.        to the libraries you specify.
  4300.  
  4301.  
  4302.   Removing library names
  4303.  
  4304.  Another complication might arise if you create your own libraries: normally,
  4305.  each module in the library you create contains a standard-library name, and
  4306.  the linker tries to search the standard libraries named in the modules when
  4307.  it links with your library.
  4308.  
  4309.  The safest course, especially when you are distributing libraries to others,
  4310.  is to use the /Zl option when you compile the object files that make up your
  4311.  libraries. The /Zl option tells the compiler not to put library names in the
  4312.  object files. Later, when you link other object files with your library, the
  4313.  standard library used for linking will depend only on the floating-point and
  4314.  memory-model options used to compile those object files.
  4315.  
  4316.  
  4317.  Examples
  4318.  
  4319.    QCL CALC.C ANOTHER SUM
  4320.  
  4321.  In the example above, no floating-point option is given, so QCL compiles the
  4322.  source file CALC.C with the default floating-point option, /FPi. The /FPi
  4323.  option generates in-line instructions and selects the small-model-emulator
  4324.  combined library (SLIBCE.LIB), which is the default.
  4325.  
  4326.    QCL /FPi87 CALC.C ANOTHER.OBJ SUM.OBJ /link SLIBCE.LIB /NOD
  4327.  
  4328.  In the example above, QCL compiles CALC.C with the /FPi87 option, which
  4329.  selects the SLIBC7.LIB library. The /link option, however, overrides the
  4330.  default library specification: the /NOD option suppresses the search for the
  4331.  default library, and the alternate math library (SLIBCE.LIB) is specified.
  4332.  QLINK uses SLIBCE.LIB when it creates the resulting executable file,
  4333.  CALC.EXE.
  4334.  
  4335.  
  4336.  4.3.12.4  Compatibility between Floating-Point Options
  4337.  
  4338.  Each time you compile a source file, you can specify a floating-point
  4339.  option. When you link two or more source files to produce an executable
  4340.  program file, you are responsible for ensuring that floating-point
  4341.  operations are handled in a consistent way.
  4342.  
  4343.  
  4344.  Example
  4345.  
  4346.    QCL /AM CALC.C ANOTHER SUM /link MLIBC7.LIB /NOD
  4347.  
  4348.  The preceding example compiles the program CALC.C with the medium-model
  4349.  option (/AM). Because no floating-point option is specified, the default
  4350.  (/FPi) is used. The /FPi option generates in-line 8087/80287 instructions
  4351.  and specifies the emulator library MLIBCE.LIB in the object file. The /link
  4352.  field specifies the /NOD option and the name of the medium-model 8087/80287
  4353.  library, MLIBC7.LIB. Specifying the 8087/80287 library forces the program to
  4354.  use an 8087 coprocessor; the program fails if a coprocessor is not present.
  4355.  
  4356.  
  4357.  
  4358.  4.3.12.5  The NO87 Environment Variable
  4359.  
  4360.  Programs compiled with the /FPi option automatically use an 8087 or 80287
  4361.  coprocessor at run time if one is installed. You can override this and force
  4362.  the use of the emulator instead by setting an environment variable named
  4363.  NO87.
  4364.  
  4365.   Coprocessor-suppression message
  4366.  
  4367.  If NO87 is set to any value when the program is executed, the program will
  4368.  use the emulator even if a coprocessor is present. When this occurs, the
  4369.  NO87 setting is displayed on the standard output as a message. The message
  4370.  is displayed only if a coprocessor is present and its use is suppressed; if
  4371.  no coprocessor is present, no message appears. If you want to force use of
  4372.  the emulator, but don't want a message to appear, set NO87 equal to one or
  4373.  more spaces. The variable is still considered to be defined.
  4374.  
  4375.  Note that the presence or absence of the NO87 definition determines whether
  4376.  use of the coprocessor is suppressed. The actual value of the NO87 setting
  4377.  is used only for the message.
  4378.  
  4379.  The NO87 variable takes effect with any program linked with an emulator
  4380.  library (mLIBCE.LIB). It has no effect on programs linked with 8087/80287
  4381.  libraries (mLIBC7.LIB).
  4382.  
  4383.  
  4384.  Examples
  4385.  
  4386.    SET NO87=Use of coprocessor suppressed
  4387.  
  4388.  The example above causes the message  Use of coprocessor suppressed  to
  4389.  appear when a program that would use an 8087 or 80287 coprocessor is
  4390.  executed on a computer that has such a coprocessor.
  4391.  
  4392.    SET NO87=space
  4393.  
  4394.  The example above sets the NO87 variable to the space character. Use of the
  4395.  coprocessor is still suppressed, but no message is displayed.
  4396.  
  4397.  
  4398.  4.3.12.6  Standard Combined Libraries
  4399.  
  4400.  Table 4.3 shows each combination of memory-model and floating-point options
  4401.  and the corresponding library name that QCL embeds in the object file.
  4402.  
  4403.  Table 4.3  QCL Options and Default Libraries
  4404.  
  4405. ╓┌──────────────────────┌────────────────────┌───────────────────────────────╖
  4406.  Floating-Point Option  Memory-Model Option  Default Library
  4407.  ────────────────────────────────────────────────────────────────────────────
  4408.  /FPi87                 /AT or /AS           SLIBC7.LIB
  4409.                         /AM                  MLIBC7.LIB
  4410.                         /AC                  CLIBC7.LIB
  4411.                         /AL or /AH           LLIBC7.LIB
  4412.  Floating-Point Option  Memory-Model Option  Default Library
  4413.  ────────────────────────────────────────────────────────────────────────────
  4414.                        /AL or /AH           LLIBC7.LIB
  4415.  /FPi                   /AT or /AS           SLIBCE.LIB
  4416.                         /AM                  MLIBCE.LIB
  4417.                         /AC                  CLIBCE.LIB
  4418.                         /AL or /AH           LLIBCE.LIB
  4419.  ────────────────────────────────────────────────────────────────────────────
  4420.  
  4421.  
  4422.  
  4423.  4.3.13  /G0, /G1, /G2 (Generate Instructions for 8086, 80186, or 80286
  4424.  Processor)
  4425.  
  4426.  
  4427.  If you are writing programs for a machine with an 80186 or 80286 processor,
  4428.  you can use the /G1 or the /G2 option, respectively, to enable the
  4429.  instruction set for those processors. When you use either of these options,
  4430.  the compiler automatically defines the identifier M_I286.
  4431.  
  4432.  Although it is sometimes advantageous to enable the appropriate instruction
  4433.  set, you may not always wish to do so. If you have an 80286 processor, for
  4434.  example, but you want your program to be able to run on an 8086, do not
  4435.  compile with the /G2 option.
  4436.  
  4437.  The /G0 option enables the instruction set for the 8086/8088 processor. You
  4438.  do not have to specify this option explicitly because QCL uses the 8086/8088
  4439.  instruction set by default. Programs compiled with this option will also run
  4440.  on machines with 80186 and 80286 processors but will not take advantage of
  4441.  any processor-specific instructions. When you specify the /G0 option, the
  4442.  compiler automatically defines the identifier M_I8086.
  4443.  
  4444.  If your program includes in-line assembler code that uses a mnemonic
  4445.  instruction supported only by the 80186/87 or 80286/87 processors, you must
  4446.  compile with the /G1 or the /G2 option, respectively; compiling with /G0
  4447.  results in an error. Note that you cannot use 80186 or 80286 mnemonics as
  4448.  labels, even if you are compiling for an 8086/8088.
  4449.  
  4450.  These options apply to all file names that follow on the command line until
  4451.  another /G0, /G1 or /G2 option appears.
  4452.  
  4453.  
  4454.  4.3.14  /Gc, /Gd (Use FORTRAN/Pascal or C Calling Convention)
  4455.  
  4456.  The _fortran, _pascal, and _cdecl keywords along with the /Gc and /Gd
  4457.  options, allow you to control the function-calling and naming conventions so
  4458.  that your QuickC programs can call and be called by functions that are
  4459.  written in FORTRAN or Pascal.
  4460.  
  4461.   Parameter-passing conventions
  4462.  
  4463.  Because functions in QuickC programs can take a variable number of
  4464.  arguments, QuickC must handle function calls differently from languages such
  4465.  as Pascal and FORTRAN. Pascal and FORTRAN normally push actual parameters to
  4466.  a function in left-to-right order so that the last argument in the list is
  4467.  the last one pushed on the stack. In contrast, because QuickC functions do
  4468.  not always know the number of actual parameters, they must push their
  4469.  arguments from right to left, so that the first argument in the list is the
  4470.  last one pushed.
  4471.  
  4472.   Stack-cleanup conventions
  4473.  
  4474.  Another difference between QuickC programs and FORTRAN or Pascal programs is
  4475.  that in QuickC programs, the calling function must remove the arguments from
  4476.  the stack. In Pascal and FORTRAN programs, the called function must remove
  4477.  the arguments. If the code for removing arguments is in the called function
  4478.  (as in Pascal and FORTRAN), it appears only once; if it is in the calling
  4479.  function (as in QuickC), it appears every time there is a function call.
  4480.  Because a typical program has more function calls than functions, the
  4481.  Pascal/FORTRAN method results in slightly smaller, more efficient programs.
  4482.  
  4483.  
  4484.   The _pascal and _fortran keywords
  4485.  
  4486.  The QuickC compiler can generate the Pascal/FORTRAN calling convention in
  4487.  one of several ways. The first is through the use of the _pascal and
  4488.  _fortran keywords. When these keywords are applied to functions, or to
  4489.  pointers to functions, they indicate a corresponding Pascal or FORTRAN
  4490.  function (or a function that uses the Pascal/FORTRAN calling convention).
  4491.  Therefore, the correct calling convention must be used. In the following
  4492.  example,  sort  is declared as a function using the alternative calling
  4493.  convention:
  4494.  
  4495.    short pascal sort(char *, char *);
  4496.  
  4497.  The _pascal and _fortran keywords can be used interchangeably. Use them when
  4498.  you want to use the left-to-right calling sequence for selected functions
  4499.  only.
  4500.  
  4501.   The /Gc option
  4502.  
  4503.  The second method for generating the Pascal/FORTRAN calling convention is to
  4504.  use the /Gc option. If you use the /Gc option, the entire module is compiled
  4505.  using the alternative calling convention. You might use this method to make
  4506.  it possible to call all the functions in a QuickC module from another
  4507.  language or to gain the performance and size improvement provided by this
  4508.  calling convention.
  4509.  
  4510.  When you use /Gc to compile a module, the compiler assumes that all
  4511.  functions called from that module use the Pascal/FORTRAN calling convention,
  4512.  even if the functions are defined outside that module. Therefore, using /Gc
  4513.  would normally mean that you cannot call or define functions that take
  4514.  variable numbers of parameters and that you cannot call functions such as
  4515.  the QuickC library functions that use the QuickC calling sequence. In
  4516.  addition, if you compile with the /Gc option, either you must declare the
  4517.  main function in the source program with the _cdecl keyword, or you must
  4518.  change the start-up routine so that it uses the correct naming and calling
  4519.  conventions when calling main.
  4520.  
  4521.   The _cdecl keyword
  4522.  
  4523.  The _cdecl keyword in QuickC is the "inverse" of the _fortran and _pascal
  4524.  keywords. When applied to a function or function pointer, it indicates that
  4525.  the associated function is to be called using the normal QuickC calling
  4526.  convention. This allows you to write QuickC programs that take advantage of
  4527.  the more efficient Pascal/FORTRAN calling convention while still having
  4528.  access to the entire QuickC library, other QuickC objects, and even
  4529.  user-defined functions that accept variable-length argument lists. The
  4530.  _cdecl keyword takes precedence over the /Gc option.
  4531.  
  4532.  For convenience, the _cdecl keyword has already been applied to
  4533.  run-timelibrary function declarations in the include files distributed with
  4534.  the QuickC compiler. Therefore, your QuickC programs can call the library
  4535.  functions freely, no matter which calling conventions you compile with. Just
  4536.  make sure to use the appropriate include file for each library function the
  4537.  program calls.
  4538.  
  4539.   The /Gd option
  4540.  
  4541.  The /Gd option has the same effect as the _cdecl keyword. It specifies that
  4542.  the entire module should use the C calling convention. This option is on by
  4543.  default.
  4544.  
  4545.   Naming conventions
  4546.  
  4547.  Use of the _pascal and _fortran keywords, or the /Gc option, also affects
  4548.  the naming convention for the associated item (or, in the case of /Gc, all
  4549.  items): the name is converted to uppercase letters, and the leading
  4550.  underscore that QuickC normally prefixes is not added. The _pascal and
  4551.  _fortran keywords can be applied to data items and pointers, as well as to
  4552.  functions; when applied to data items or pointers, these keywords force the
  4553.  naming convention described above for that item or pointer.
  4554.  
  4555.  The _pascal, _fortran, and _cdecl keywords, like the _near, _far, and _huge
  4556.  keywords, are disabled by use of the /Za option. If this option is given,
  4557.  these names are treated as ordinary identifiers, rather than keywords.
  4558.  
  4559.  
  4560.  Examples
  4561.  
  4562.    int _cdecl var_print(char*,...);
  4563.  
  4564.  In the example above,  var_print  is declared with a variable number of
  4565.  arguments using the normal right-to-left QuickC function-calling convention
  4566.  and naming conventions. The _cdecl keyword overrides the left-to-right
  4567.  calling sequence set by the /Gc option if the option is used to compile the
  4568.  source file in which this declaration appears. If this file is compiled
  4569.  without the /Gc option, _cdecl has no effect since it is the same as the
  4570.  default QuickC convention.
  4571.  
  4572.    float *pascal nroot(number, root);
  4573.  
  4574.  The example above declares  nroot  to be a function returning a pointer to a
  4575.  value of type float. The function  nroot uses the default calling sequence
  4576.  (left-to-right) and naming conventions for Microsoft FORTRAN and Pascal
  4577.  programs.
  4578.  
  4579.  
  4580.  4.3.15  /Ge, /Gs (Turn Stack Checking On or Off)
  4581.  
  4582.   Stack probes
  4583.  
  4584.  A "stack probe" is a short routine called on entry to a function to verify
  4585.  that the program stack has enough room to allocate local variables required
  4586.  by the function. The stack-probe routine is called at every function-entry
  4587.  point. Ordinarily, the stack-probe routine generates a stack-overflow
  4588.  message if the required stack space is not available. When stack checking is
  4589.  turned off, the stack-probe routine is not called, and stack overflow can
  4590.  occur without being diagnosed (that is, no stack-overflow message is
  4591.  printed).
  4592.  
  4593.  The QuickC compiler uses stack probes to guard against possible execution
  4594.  errors. These stack probes are used whenever the /Ge option (the default) is
  4595.  in effect. You can remove the stack probes by using either the /Gs option or
  4596.  the check_stack pragma, which will reduce the size of a program and speed up
  4597.  execution slightly. Note that the /Gs option and the check_stack pragma have
  4598.  no effect on standard C library routines, only on the functions you compile.
  4599.  
  4600.  
  4601.   When to use the /Gs option
  4602.  
  4603.  Use the /Gs option when you want to turn off stack checking for an entire
  4604.  module, if you know that the program does not exceed the available stack
  4605.  space. For example, stack probes may not be needed for programs that make
  4606.  very few function calls or that have only modest local-variable
  4607.  requirements. In the absence of the /Gs option, stack checking is on. The
  4608.  /Gs option should be used with great care. Although it can make programs
  4609.  smaller and faster, it may mean that the program will not be able to detect
  4610.  certain execution errors.
  4611.  
  4612.   When to use  the check_stack pragma
  4613.  
  4614.  Use the check_stack pragma when you want to turn stack checking on or off
  4615.  only for selected routines, leaving the default (as determined by the
  4616.  presence or absence of the /Gs option) for the rest. When you want to turn
  4617.  off stack checking, put the following line before the definition of the
  4618.  function you don't want to check:
  4619.  
  4620.    #pragma check_stack (off)
  4621.  
  4622.  Note that the preceding line disables stack checking for all routines that
  4623.  follow it in the source file, not just the routines on the same line. To
  4624.  reinstate stack checking, insert the following line:
  4625.  
  4626.    #pragma check_stack (on)
  4627.  
  4628.  If you don't give an argument for the check_stack pragma, stack checking
  4629.  reverts to the behavior specified on the command line: disabled if the /Gs
  4630.  option is given, or enabled if it is not. The interaction of the check_stack
  4631.  pragma with the /Gs option is summarized in Table 4.4.
  4632.  
  4633.  Table 4.4  Using the check_stack Pragma
  4634.  
  4635. ╓┌────────────────────────┌────────────────────────┌─────────────────────────╖
  4636.                           Compiled with /Gs
  4637.  Syntax                   Option?                  Action
  4638.  ────────────────────────────────────────────────────────────────────────────
  4639.  #pragma check_stack()    Yes                      Turns off stack checking
  4640.                                                    for routines that follow
  4641.  
  4642.  #pragma check_stack()    No                       Turns on stack checking
  4643.                           Compiled with /Gs
  4644.  Syntax                   Option?                  Action
  4645.  ────────────────────────────────────────────────────────────────────────────
  4646. #pragma check_stack()    No                       Turns on stack checking
  4647.                                                    for routines that follow
  4648.  
  4649.  #pragma check_stack(on)  Yes or no                Turns on stack checking
  4650.                                                    for routines that follow
  4651.  
  4652.  #pragma                   Yes or no                Turns off stack checking
  4653.  check_stack(off)                                  for routines that follow
  4654.  
  4655.  ────────────────────────────────────────────────────────────────────────────
  4656.  
  4657.  
  4658.  
  4659.  ────────────────────────────────────────────────────────────────────────────
  4660.  NOTE
  4661.  For versions of Microsoft QuickC prior to 2.0, the check_stack pragma had a
  4662.  different format: check_stack(+) to enable stack checking and check_stack(-)
  4663.  to disable stack checking. Although the Microsoft QuickC compiler still
  4664.  accepts this format, its use is discouraged because it may not be supported
  4665.  in future versions.
  4666.  ────────────────────────────────────────────────────────────────────────────
  4667.  
  4668.  
  4669.  Example
  4670.  
  4671.    QCL /Gs FILE.C
  4672.  
  4673.  This example optimizes the file FILE.C by removing stack probes with the /Gs
  4674.  option. If you want stack checking for only a few functions in FILE.C, you
  4675.  can use the check_stack pragma before and after the definitions of functions
  4676.  you want to check.
  4677.  
  4678.  
  4679.  4.3.16  /Gi (Use Incremental Compilation)
  4680.  
  4681.  
  4682.  Option
  4683.  
  4684.    /Gi«mdtname»
  4685.  
  4686.  When you specify the /Gi option, QCL compiles only those functions in each C
  4687.  source file that have changed since the last time the source file was
  4688.  compiled. The process of compiling only the changed functions in a source
  4689.  file is known as "incremental compilation." Because the compiler does not
  4690.  need to handle the entire source file, incremental compilation is
  4691.  considerably faster than regular compilation. However, the object files
  4692.  created and the code generated when you compile incrementally may be larger.
  4693.  
  4694.  
  4695.  If you specify any of the optimization (/Ostring) options on the same line
  4696.  with /Gi, the compiler ignores the /Gi option.
  4697.  
  4698.  If you own the Microsoft C Optimizing Compiler version 5.1 or earlier, and
  4699.  you wish to use the CodeView debugger, do not use the /Gi option or the
  4700.  related /Li option (for incremental linking). You can use the QuickC
  4701.  integrated debugger, or the CodeView debugger included with the Microsoft C
  4702.  Professional Development System version 6.0, on programs compiled with /Gi
  4703.  and /Li.
  4704.  
  4705.   Module-description table (MDT)
  4706.  
  4707.  The compiler tracks changes for incremental compilation in a file known as a
  4708.  "module-description table," or MDT. A single MDT can contain change
  4709.  information for multiple source files. If you specify mdtname, the compiler
  4710.  saves change information for all source files in a single MDT named mdtname.
  4711.  If you do not specify mdtname, the compiler creates one MDT for each source
  4712.  file named on the command line. Each MDT has the base name of the source
  4713.  file and the .MDT extension.
  4714.  
  4715.  The types of changes made to a source file determine whether the compiler
  4716.  can incrementally compile a source file and whether the compiler creates or
  4717.  updates the corresponding MDT.
  4718.  
  4719.   Incrementally compile, update MDT
  4720.  
  4721.  Except as noted below, if changes are confined to function bodies, the QCL
  4722.  command compiles only those changed functions and the "global regions" of
  4723.  the source file. Global regions are the parts of the source file between the
  4724.  closing curly brace (}) of one function and the opening curly brace ({) of
  4725.  the next function (see Figure 4.2). The compiler also updates the MDT to
  4726.  reflect changes to the source file.
  4727.  
  4728.  (This figure may be found in the printed book.)
  4729.  
  4730.  If a global region of the source file has changed, QCL recompiles from the
  4731.  point at which the change occurred. A change in a global region is any
  4732.  change in the storage-class specifier, type specifier, function declarator,
  4733.  or formal-parameter declarations of a function. Similarly, if a file
  4734.  specified in an #include directive has a more recent modification date than
  4735.  the including object module, QCL recompiles the source file from the point
  4736.  at which the #include directive appears. In addition, if a function is
  4737.  defined within an include file, the source file is recompiled from the start
  4738.  of the function.
  4739.  
  4740.   Compile whole program, don't update MDT
  4741.  
  4742.  The compiler must recompile an entire source file, but does not update its
  4743.  MDT, in both of these cases:
  4744.  
  4745.  
  4746.    ■   A function definition appears within an include file.
  4747.  
  4748.    ■   The compiler does not have enough memory to create the MDT.
  4749.  
  4750.  
  4751.   Using function prototypes
  4752.  
  4753.  For fastest compilation with /Gi, use a prototype for each function in your
  4754.  program. A function prototype lists the name and type of the function and
  4755.  the name and type of each of its parameters. (See Chapter 2, "Functions," in
  4756.  C for Yourself for more information.) The C include files that Microsoft
  4757.  supplies contain prototypes for all the functions in the C run-time library.
  4758.  The information in the prototypes lets the compiler check the number and
  4759.  type of arguments to the function.
  4760.  
  4761.  If you use the /Gi option and your program contains functions without
  4762.  corresponding prototypes, the compiler issues the following level 3 warning
  4763.  message:
  4764.  
  4765.    no function prototype given
  4766.  
  4767.   Compilation errors
  4768.  
  4769.  When the /Gi option is given and errors occur during compilation, the
  4770.  compiler still creates a partial object file; that is, it generates object
  4771.  code up to the point at which the error occurs. It places a record in each
  4772.  object file indicating that the object file is invalid. If you try to link
  4773.  one of these object files, the linker issues the following error message:
  4774.  
  4775.    invalid object due to aborted incremental compile
  4776.  
  4777.   Incremental linking
  4778.  
  4779.  When the compiler can perform incremental compilation, it invokes a special
  4780.  form of the linker that performs "incremental linking." Like incremental
  4781.  compiling, incremental linking links only the object files that have changed
  4782.  since the previous link. No library searches are performed; the assumption
  4783.  is that the libraries are exactly the same as in the previous link.
  4784.  Incremental linking is considerably faster than regular linking. If any of
  4785.  the changes to the program prevent QuickC from performing an incremental
  4786.  link, it automatically performs a full link. If you specify the /c option
  4787.  along with the /Gi option, QCL performs incremental compilation, but does
  4788.  not invoke any linker.
  4789.  
  4790.  ────────────────────────────────────────────────────────────────────────────
  4791.  NOTE
  4792.  
  4793.  If you use the /Gi option with the /Fm option (which produces a map file),
  4794.  the map file is a segmented-executable map file rather than a DOS-executable
  4795.  map file. The segment addresses in the file are different from those in DOS
  4796.  map files, and the file itself has a different format.
  4797.  ────────────────────────────────────────────────────────────────────────────
  4798.  
  4799.  
  4800.  Examples
  4801.  
  4802.  For the following examples, assume there are three C source files named
  4803.  MOD1.C, MOD2.C, and MOD3.C .
  4804.  
  4805.    QCL /Gi MOD1.C MOD2.C MOD3.C
  4806.  
  4807.  The example above incrementally compiles and links the three C source files.
  4808.  Three MDTs are created or updated: MOD1.MDT, MOD2.MDT, and MOD3.MDT.
  4809.  
  4810.    QCL /GiMYMDT.MDT MOD1.C MOD2.C MOD3.C
  4811.  
  4812.  The example above has the same effect as the example preceding it, except
  4813.  that the compiler creates or updates only one MDT named MYMDT.MDT. This MDT
  4814.  includes all change-control information for the three C source files.
  4815.  
  4816.  
  4817.  4.3.17  /Gr (Register Calling Convention)
  4818.  
  4819.  Normally, your program passes parameters to functions on the stack. The /Gr
  4820.  option causes your program to pass parameters in registers instead. This
  4821.  calling convention decreases execution time if you are using the Microsoft C
  4822.  Professional Development System version 6.0, but it gives no advantage if
  4823.  you are using QuickC. Therefore, you should use the /Gr option only if you
  4824.  plan on using the C Professional Development System for your final
  4825.  compilation.
  4826.  
  4827.  This method of parameter passing is not appropriate for all functions. The
  4828.  /Gr option enables it for all eligible functions, and the _fastcall keyword
  4829.  enables it on a function-by-function basis. The _fastcall keyword cannot be
  4830.  used with the _cdecl or _pascal keywords.
  4831.  
  4832.  Because the 80x86 processor has a limited number of registers, only the
  4833.  first three parameters are passed in registers; the remaining parameters are
  4834.  passed using the FORTRAN/Pascal calling convention (see the /Gc option).
  4835.  
  4836.  Note that the compiler allocates different registers for variables declared
  4837.  as register and for passing arguments using the register calling convention.
  4838.  Passing arguments in registers does not conflict with any register variables
  4839.  that you may have declared.
  4840.  
  4841.  ────────────────────────────────────────────────────────────────────────────
  4842.  IMPORTANT
  4843.  
  4844.  Exercise caution when using the register calling convention for any function
  4845.  written in in-line assembly language. Your use of registers in assembly
  4846.  language could conflict with the compiler's use of registers for storing
  4847.  parameters.
  4848.  ────────────────────────────────────────────────────────────────────────────
  4849.  
  4850.  
  4851.  4.3.17.1  The _fastcall Calling Convention
  4852.  
  4853.  The following section describes the details of the _fastcall calling
  4854.  convention. This information is for assembly-language programmers who are
  4855.  interested in using either the in-line assembler or the Microsoft Macro
  4856.  Assembler to write functions declared as _fastcall.
  4857.  
  4858.  ────────────────────────────────────────────────────────────────────────────
  4859.  WARNING
  4860.  
  4861.  The register usage documented here applies only to Microsoft QuickC version
  4862.  2.5 and Microsoft C Professional Development System version 6.0. It may
  4863.  change in future releases of either compiler.
  4864.  ────────────────────────────────────────────────────────────────────────────
  4865.  
  4866.  
  4867.  4.3.17.2  Argument-Passing Convention
  4868.  
  4869.  The _fastcall register calling convention is "strongly typed": the compiler
  4870.  allocates arguments to registers according to the argument's data types.
  4871.  Strong typing allows the compiler to generate better code. Because the
  4872.  compiler chooses registers depending on the type of the argument and not in
  4873.  a strict linear order, the calling program and called function must agree on
  4874.  the types of the arguments in order to communicate data correctly.
  4875.  
  4876.  For each type of argument, there is a list of register candidates. Each
  4877.  argument is put in the first register candidate that does not already
  4878.  contain an argument. If no suitable register remains unused, the arguments
  4879.  are pushed onto the stack in left-to-right order. The following list shows
  4880.  the basic types and the register candidate for each:
  4881.  
  4882.  Type                              Register Candidates
  4883.  ────────────────────────────────────────────────────────────────────────────
  4884.  character                         AL, DL, BL
  4885.  
  4886.  unsigned character                AL, DL, BL
  4887.  
  4888.  integer                           AX, DX, BX
  4889.  
  4890.  unsigned integer                  AX, DX, BX
  4891.  
  4892.  long integer                      DX:AX
  4893.  
  4894.  unsigned long integer             DX:AX
  4895.  
  4896.  near pointer                      BX, AX, DX
  4897.  
  4898.  Structures and unions are always pushed onto the stack, as are all
  4899.  floating-point types.
  4900.  
  4901.  
  4902.  4.3.17.3  Return Value Convention
  4903.  
  4904.  The _fastcall return value convention is based on the size of the return
  4905.  value, except with floating-point types. All floating point types are
  4906.  returned on the top of the numeric coprocessor stack (whether real or
  4907.  emulated). The following list shows how values 4 bytes or smaller, including
  4908.  unions and structures, are returned from a _fastcall function.
  4909.  
  4910.  Size                              Return Convention
  4911.  ────────────────────────────────────────────────────────────────────────────
  4912.  1 Byte                            AL Register
  4913.  
  4914.  2 Bytes                           AX Register
  4915.  
  4916.  4 Bytes                           DX, AX Registers (for pointers, the
  4917.                                    segment is returned in DX, the offset in
  4918.                                    AX; for long integers, the
  4919.                                    most-significant byte is returned in DX,
  4920.                                    leastsignificant byte in AX)
  4921.  
  4922.  The method for returning values 4 bytes or smaller is the same as for
  4923.  functions declared as _cdecl. To return structures and unions larger than 4
  4924.  bytes, the calling function passes a hidden parameter after the rest of the
  4925.  parameters have been pushed. This parameter is a near pointer, based in the
  4926.  segment specified by the stack register (SS), to a buffer in which the value
  4927.  is to be returned. A far pointer to SS:hidden-param is returned in DX:AX.
  4928.  This is the same convention for returning structures as _pascal.
  4929.  
  4930.  
  4931.  4.3.17.4  Stack Adjustment Convention
  4932.  
  4933.  When a function declared as _cdecl terminates, the calling program clears
  4934.  the stack of the parameters it passed. However, functions declared as
  4935.  _fastcall must pop the parameters off the stack themselves. The calling
  4936.  function does not adjust the stack after function return.
  4937.  
  4938.  
  4939.  4.3.17.5  Register Preservation Requirement
  4940.  
  4941.  All functions must preserve the DS, BP, SI, and DI registers. Your _fastcall
  4942.  function can modify the values in AX, DX, and BX.
  4943.  
  4944.  ────────────────────────────────────────────────────────────────────────────
  4945.  NOTE
  4946.  
  4947.  The compiler can make significant optimizations by keeping certain values in
  4948.  registers. One such value is the base for variables declared as _based. This
  4949.  value is normally stored in the ES register. By declaring functions as
  4950.  _fastcall, you guarantee that the ES register is preserved and that ES does
  4951.  not have to be reloaded.
  4952.  ────────────────────────────────────────────────────────────────────────────
  4953.  
  4954.  
  4955.  4.3.18  /Gt (Set Data Threshold)
  4956.  
  4957.  
  4958.  Option
  4959.  
  4960.    /Gt«number»
  4961.  
  4962.  The /Gt option causes all data items whose size is greater than or equal to
  4963.  number bytes to be allocated in a new data segment.
  4964.  
  4965.  If you specify number, it must follow the /Gt option immediately with no
  4966.  intervening spaces. If you use /Gt without a number, the default threshold
  4967.  value is 256. If you don't use the /Gt option, the default threshold value
  4968.  is 32,767.
  4969.  
  4970.  Use this option with programs that have more than 64K of initialized static
  4971.  and global data in small data items.
  4972.  
  4973.  By default, the compiler allocates all static and global data items within
  4974.  the default data segment in the tiny, small and medium memory models. In
  4975.  compact-, large-, and huge-model programs, only initialized static and
  4976.  global data items are assigned to the default data segment.
  4977.  
  4978.  ────────────────────────────────────────────────────────────────────────────
  4979.  NOTE
  4980.  
  4981.  You can use the /Gt option only if you are creating a compact-, large-, or
  4982.  huge-model program because tiny-, small-, and medium-model programs have
  4983.  only one data segment.
  4984.  ────────────────────────────────────────────────────────────────────────────
  4985.  
  4986.  
  4987.  4.3.19  /Gw, /GW (Generate Code for Windows(tm) Function Calls)
  4988.  
  4989.  The /Gw option instructs the compiler to generate entry/exit code sequences
  4990.  for call-back functions in Windows applications. The /GW option is similar,
  4991.  but it generates a more efficient entry sequence and is intended for use
  4992.  with non-call-back functions. See the Microsoft Windows(tm) Software
  4993.  Development Kit for more information.
  4994.  
  4995.  
  4996.  4.3.20  /HELP (List the Compiler Options)
  4997.  
  4998.  
  4999.  Option
  5000.  
  5001.    /HELP
  5002.    /help
  5003.  
  5004.  This option displays a list of the most commonly used compiler options. QCL
  5005.  processes all information on the line containing the /help option and
  5006.  displays the command list.
  5007.  
  5008.  Unlike all the other QCL options, /HELP is not case sensitive. Any
  5009.  combination of uppercase and lowercase letters is acceptable. For example,
  5010.  /hELp is a valid form of this option. The option has no abbreviation.
  5011.  
  5012.  
  5013.  4.3.21  /I (Search Directory for Include Files)
  5014.  
  5015.  
  5016.  
  5017.  Option
  5018.  
  5019.  /Idirectory
  5020.  
  5021.  You can add to the list of directories searched for include files by using
  5022.  the /I (for "include") option. This option causes the compiler to search the
  5023.  directory you specify before searching the directories given by the INCLUDE
  5024.  environment variable. That way, you can give a particular file special
  5025.  handling without changing the compiler environment you normally use.
  5026.  
  5027.  The space between /I and directory is optional. To search more than one
  5028.  directory, you can give additional /I options on the QCL command line. The
  5029.  directories are searched in order of their appearance on the command line.
  5030.  
  5031.  The directories are searched only until the specified include file is found.
  5032.  If the file is not found in the given directories or the standard places,
  5033.  the compiler prints an error message and stops processing. When this occurs,
  5034.  you must restart compilation with a corrected directory specification.
  5035.  
  5036.  
  5037.  Examples
  5038.  
  5039.    QCL /I \INCLUDE /I\MY\INCLUDE MAIN.C
  5040.  
  5041.  In the example above, QCL looks for the include files requested by MAIN.C in
  5042.  the following order: first in the directory \INCLUDE, then in the directory
  5043.  \MY\INCLUDE, and finally in the directory or directories assigned to the
  5044.  INCLUDE environment variable.
  5045.  
  5046.    QCL /X /I \ALT\INCLUDE MAIN.C
  5047.  
  5048.  In the example above, the compiler looks for include files only in the
  5049.  directory \ALT\INCLUDE. First the /X option tells QCL to consider the list
  5050.  of standard places empty; then the /I option specifies one directory to be
  5051.  searched.
  5052.  
  5053.  
  5054.  4.3.22  /J (Change Default char Type)
  5055.  
  5056.  In Microsoft QuickC, the char type is signed by default, so if a char value
  5057.  is widened to int type, the result is sign-extended.
  5058.  
  5059.  You can change this default to unsigned with the /J option, causing the char
  5060.  type to be zero-extended when widened to int type. If a char value is
  5061.  explicitly declared signed, however, the /J option does not affect it, and
  5062.  the value is sign-extended when widened to int type. This option is useful
  5063.  when working with character data that eventually will be translated into a
  5064.  language other than English.
  5065.  
  5066.  When you specify /J, the compiler automatically defines the identifier
  5067.  _CHAR_UNSIGNED, which is used with #ifndef in the LIMITS.H include file to
  5068.  define the range of the default char type.
  5069.  
  5070.  
  5071.  4.3.23  /Lc, Lr (Compile for Real Mode)
  5072.  
  5073.  The /Lc and /Lr options are synonymous. Both options compile the program for
  5074.  OS/2 real mode or for the DOS environment. If you compile with /Lc or /Lr,
  5075.  you must make sure the linker uses the appropriate real-mode library; either
  5076.  use /NOD to tell the linker not to search for the default library, or rename
  5077.  the appropriate real-mode library so that it has the default name.
  5078.  
  5079.  
  5080.  4.3.24  /Li (Link Incrementally)
  5081.  
  5082.  The /Li option specifies incremental linking, causing QCL to invoke ILINK
  5083.  instead of QLINK for linking the object files. When you link incrementally,
  5084.  the linker pads all _near functions to a 40-byte boundary by default. Note
  5085.  that QCL automatically invokes the incremental linker when you use the /Gi
  5086.  option for incremental compilation, unless you also specify the /c option to
  5087.  prevent linking.
  5088.  
  5089.  
  5090.  4.3.25  /Ln (Link without C Run-Time Startup Code)
  5091.  
  5092.  If you are using the tiny memory model (see the /AT option for QCL), you
  5093.  will be creating a .COM file (see the /T option for QLINK). Normally, QCL
  5094.  tells QLINK to link tiny- model programs with CRTCOM.LIB; this file contains
  5095.  startup code needed by any .COM program written in C. Programs that are
  5096.  written in assembly language do not need this code. Use the /Ln option to
  5097.  keep QLINK from linking with this startup code.
  5098.  
  5099.  
  5100.  4.3.26  /ND, /NT (Name the Data or Code Segments)
  5101.  
  5102.  
  5103.  Options
  5104.  
  5105.    /NDdatasegment
  5106.    /NTcodesegment
  5107.  
  5108.  The /ND option renames a data segment in a QuickC program, and the /NT
  5109.  option renames a code segment. The name can be any combination of letters
  5110.  and digits. The space between the option and the argument is optional.
  5111.  
  5112.  Each object file produced by the QuickC compiler has its code and its data
  5113.  stored separately, in blocks called "segments." A segment that contains
  5114.  program instructions is called a "code segment," while a segment that
  5115.  contains program data is
  5116.  
  5117.  called a "data segment." An object file may have one or more of each kind of
  5118.  segment. When object files are linked into a program, these segments are
  5119.  combined and reorganized. The program's memory model determines how many
  5120.  code segments and how many data segments the resulting program has (see
  5121.  Appendix B).
  5122.  
  5123.  Every segment in every object file has a name. The linker uses this name to
  5124.  determine which segments are combined during linking, and how the segments
  5125.  are arranged in the .EXE file. (Note that the segments in the group named
  5126.  DGROUP are an exception.) By using the /ND and /NT options, you can control
  5127.  how segments are combined and arranged.
  5128.  
  5129.  The QuickC compiler normally gives the code and data segments default names.
  5130.  These default names are determined by the memory model chosen for the
  5131.  program, as follows:
  5132.  
  5133.  
  5134.    ■   Tiny- and small-model programs. The code segment is named _TEXT and
  5135.        the data segment is named _DATA. These names are the same for all
  5136.        object files. During linking with the tiny model, all the code and
  5137.        data are placed in one segment. During linking with the small model,
  5138.        all code segments from all object files are placed in one segment, and
  5139.        all data segments are placed in another segment.
  5140.  
  5141.    ■   Medium-model programs. The code segment for each object file is given
  5142.        a distinct name, consisting of the module base name plus the suffix
  5143.        _TEXT. The data segment is named _DATA.
  5144.  
  5145.    ■   Compact-model programs. All data items that are smaller than the
  5146.        threshold size (specified by the /Gt option) are placed in the default
  5147.        data segment, _DATA. If they are larger than the threshold, they are
  5148.        placed in a segment having a distinct name consisting of the
  5149.        object-file name plus a suffix (_DATA, _CONST, or _BSS). The code
  5150.        segment is named _TEXT.
  5151.  
  5152.    ■   Large- and huge-model programs. The code and data from each object
  5153.        file are placed in separate segments with distinct names. Each code
  5154.        segment is given the name of the object file plus the suffix _TEXT.
  5155.        All data items smaller than the threshold size are placed in the
  5156.        default data segment, _DATA, and those that are larger are placed in a
  5157.        segment with a unique name.
  5158.  
  5159.  
  5160.  The /ND option creates three new segments with the names datasegment,
  5161.  datasegment_BSS, and datasegment_CONST, and combines them into a group named
  5162.  datasegment_GROUP. The program then treats the named segment as the default;
  5163.  that is, it assumes that the data register (DS) contains the address of the
  5164.  segment, so that it can access the segment's contents using near pointers
  5165.  instead of far. In doing so, your program no longer assumes that the address
  5166.  in the stack segment register (SS) is the same as the address in the data
  5167.  register (DS). You must therefore use the _loadds modifier for function
  5168.  declarations or the /Au segment setup option to ensure that DS is loaded on
  5169.  entry to a function.
  5170.  
  5171.  The /NT option gives the code segment the specified name. In general, you
  5172.  should not use the /NT option with the tiny, small and compact memory
  5173.  models. Doing so may cause fixup-overflow errors at link time (see Section
  5174.  5.5.6 for more information).
  5175.  
  5176.  
  5177.  4.3.27  /nologo (Suppress Display of Sign-On Banner)
  5178.  
  5179.  The /nologo option suppresses the display of the sign-on banner when QCL is
  5180.  invoked.
  5181.  
  5182.  
  5183.  4.3.28  /O Options (Optimize Program)
  5184.  
  5185.  
  5186.  Option
  5187.  
  5188.    /O string
  5189.  
  5190.  The /O options give you control over the optimizing procedures that the
  5191.  compiler performs. The string consists of one or more of the letters "d,"
  5192.  "l," "t," and "x." The list below shows how each of these affects
  5193.  optimization:
  5194.  
  5195.  Letter                            Optimizing Procedure
  5196.  ────────────────────────────────────────────────────────────────────────────
  5197.  /Od                               Turns off all optimization
  5198.  
  5199.  /Ol                               Enables loop optimization
  5200.  
  5201.  /O, /Ot                           Favors execution speed during
  5202.                                    optimization
  5203.                                    (the default)
  5204.  
  5205.  /Ox                               Maximizes optimization
  5206.  
  5207.   The letters can appear in any order. More than one /O option can be given;
  5208.  the compiler uses the last one on the command line if any conflict arises.
  5209.  Each option applies to all source files that follow on the command line.
  5210.  
  5211.  
  5212.  4.3.28.1  /Od (Turn Off Optimization)
  5213.  
  5214.  The /Od (for "debug") option tells the compiler to turn off all
  5215.  optimizations in the program. This option speeds compilation because the
  5216.  compiler does not take time to perform optimizations.
  5217.  
  5218.  Use the /Od option when you compile with the /Zi option (described in
  5219.  Section 4.3.36) to include debugging information. The /Od option does not
  5220.  reorganize code, thus making it easier to debug.
  5221.  
  5222.  
  5223.  4.3.28.2  /Ol (Optimize Loops)
  5224.  
  5225.  The /Ol option tells the compiler to perform loop optimizations, which store
  5226.  frequently used loop variables in registers. The /Ox option implicitly turns
  5227.  on the /Ol option.
  5228.  
  5229.  
  5230.  4.3.28.3  /O and /Ot (Minimize Execution Time)
  5231.  
  5232.  When you do not use any of the /O options, the QCL command automatically
  5233.  favors program execution speed in the optimization. The /O and /Ot options
  5234.  have the same effect as this default.
  5235.  
  5236.  Wherever the compiler has a choice between producing smaller (but perhaps
  5237.  slower) and larger (but perhaps faster) code, the compiler generates faster
  5238.  code. For example, when you specify the /Ot option, the compiler generates
  5239.  intrinsic functions to perform shift operations on long operands.
  5240.  
  5241.  
  5242.  4.3.28.4  /Ox (Use Maximum Optimization)
  5243.  
  5244.  The /Ox option is a shorthand way to combine optimizing options to produce
  5245.  the fastest possible program. Its effect is the same as using the following
  5246.  options on the same command line:
  5247.  
  5248.    /Olt /Gs
  5249.  
  5250.  That is, the /Ox option performs loop optimizations, favors execution time
  5251.  over code size, and removes stack probes.
  5252.  
  5253.  
  5254.  Example
  5255.  
  5256.    QCL /Ol FILE.C
  5257.  
  5258.  This command tells the compiler to perform loop optimizations when it
  5259.  compiles FILE.C. The compiler favors program speed over program size because
  5260.  the /Ot option is also specified by default.
  5261.  
  5262.  
  5263.  4.3.29  /P (Create Preprocessor-Output File)
  5264.  
  5265.  The /P writes preprocessor output to a file with the same base name as the
  5266.  source file but with the .I extension. The preprocessed listing file is
  5267.  identical to the original source file except that all preprocessor
  5268.  directives are carried out and macro expansions are performed. You normally
  5269.  use the /P option with the /C option (discussed in Section 4.3.4), which
  5270.  preserves comments in the preprocessed output.
  5271.  
  5272.  The /P option suppresses compilation; QCL does not produce an object file or
  5273.  listing, even if you specify the /Fo or /Fm option on the QCL command line.
  5274.  
  5275.  
  5276.  
  5277.  Example
  5278.  
  5279.    QCL /P MAIN.C
  5280.  
  5281.  The example above creates the preprocessed file MAIN.I from the source file
  5282.  MAIN.C.
  5283.  
  5284.  
  5285.  4.3.30  /Ta, /Tc (Specify Assembly Language or C Source File)
  5286.  
  5287.  
  5288.  Options
  5289.  
  5290.    /Tc filename
  5291.    /Ta filename
  5292.  
  5293.  The /Tc option specifies that filename is a C source file, even if it
  5294.  doesn't have the extension .C. The /Ta option specifies that filename is an
  5295.  assembly language file, even if it doesn't have the extension .ASM. You must
  5296.  have installed the Microsoft Macro Assembler in order to use the /Ta option.
  5297.  This option causes QCL to invoke the Macro Assembler to assemble the file.
  5298.  The space between the option and the filename is optional.
  5299.  
  5300.  If this option does not appear, QCL assumes that files with the .C extension
  5301.  are C source files, files with the .ASM extension are assembly language
  5302.  files, files with the .LIB extension are libraries, and files with any other
  5303.  extension or with no extension are object files.
  5304.  
  5305.  If you need to specify more than one source file with an extension other
  5306.  than .C, you must specify each source file in a separate /Tc option. The
  5307.  same is true with regard to assembly language files and the /Ta option.
  5308.  
  5309.  
  5310.  Example
  5311.  
  5312.  In the example below, the QCL command compiles the three source files
  5313.  MAIN.C, TEST.PRG, and COLLATE.PRG.
  5314.  
  5315.    QCL MAIN.C /Tc TEST.PRG /Tc COLLATE.PRG PRINT.PRG
  5316.  
  5317.  Because the file PRINT.PRG is given without a /Tc option, QCL treats it as
  5318.  an object file. Therefore, after compiling the three source files, QCL links
  5319.  the object files MAIN.OBJ, TEST.OBJ, COLLATE.OBJ, and PRINT.PRG.
  5320.  
  5321.  
  5322.  4.3.31  /U, /u (Remove Predefined Names)
  5323.  
  5324.  
  5325.  Options
  5326.  
  5327.    /U name
  5328.    /u
  5329.  
  5330.  The /U (for "undefine") option turns off the definition of one of the names
  5331.  that the QuickC compiler predefines. The /u option turns off the definitions
  5332.  of all predefined names except for the name of the memory model. These
  5333.  options do not apply to user-defined names.
  5334.  
  5335.  These names are useful in writing portable programs. For instance, they can
  5336.  be used with compiler directives to conditionally compile parts of a
  5337.  program, depending on the processor and operating system being used. The
  5338.  predefined identifiers and their meanings are listed in Table 4.5.
  5339.  
  5340.  One or more spaces can separate /U and name. You can specify more than one
  5341.  /U option on the same command line.
  5342.  
  5343.  The /u option turns off the definitions of all predefined names except
  5344.  M_I86mM, which identifies the memory model. You can use the /U option to
  5345.  remove the definition of M_I86mM. If you do, however, you must explicitly
  5346.  define the NULL constant in your program since the definition of NULL in the
  5347.  STDIO.H and STDDEF.H files depends on the memory model in use.
  5348.  
  5349.   Limits on command-line definitions
  5350.  
  5351.  The /U and /u options are useful if you need to give more than the maximum
  5352.  number of definitions (23 if you use either the /Za or the /J option, 22 if
  5353.  you use both options, or 24 otherwise) on the command line, or if you have
  5354.  other uses for the predefined names. For each predefined name you remove,
  5355.  you can substitute a definition of your own on the command line. When the
  5356.  definitions of all six predefined names are removed, you can specify up to
  5357.  30 command-line definitions. However, because MS-DOS limits the number of
  5358.  characters you can type on a command line the number of definitions you can
  5359.  specify in practice is probably fewer than 30.
  5360.  
  5361.  
  5362.  Example
  5363.  
  5364.    QCL /UMSDOS /UM_I86 WORK.C
  5365.  
  5366.  This example removes the definitions of two predefined names. Note that the
  5367.  /U option must be given twice to do this.
  5368.  
  5369.  
  5370.  4.3.32  /V (Set Version String)
  5371.  
  5372.  
  5373.  Option
  5374.  
  5375.    /V string
  5376.  
  5377.  The /V option embeds a text string in the object file. This string can label
  5378.  an object file with a version number or a copyright notice. If the specified
  5379.  string contains white-space characters, it must be enclosed in double
  5380.  quotation marks (" "). A backslash must precede any embedded double
  5381.  quotation marks.
  5382.  
  5383.  Table 4.5  Predefined Names
  5384.  
  5385. ╓┌────────────────┌────────────────────────────┌─────────────────────────────╖
  5386.  Syntax           Purpose                      When Defined
  5387.  ────────────────────────────────────────────────────────────────────────────
  5388.  _CHAR_UNSIGNED   Indicates that the char      When the /J option is given
  5389.                   type is unsigned by default.
  5390.  
  5391.  M_I86            Identifies target machine    Always
  5392.                   as a member of the Intel(R)
  5393.                   family.
  5394.  
  5395.  M_I86mM          Identifies memory model,     Always
  5396.                   where m is either T (tiny
  5397.                   model), S (small model), C
  5398.                   (compact model), M (medium
  5399.  Syntax           Purpose                      When Defined
  5400.  ────────────────────────────────────────────────────────────────────────────
  5401.                  (compact model), M (medium
  5402.                   model), L (large model), or
  5403.                   H (huge model). If huge
  5404.                   model is used, both M_I86LM
  5405.                   and M_I86HM are defined.
  5406.  
  5407.  M_I8086          Identifies target machine    When the /G0 option is given
  5408.                   as an 8086.                  and by default
  5409.  
  5410.  M_I286           Identifies target machine    When the /G1 or /G2 option
  5411.                   as an 80286.                 is given
  5412.  
  5413.  _MSC_VER         Identifies version of        Always
  5414.                   Microsoft C currently
  5415.                   supported. Equal to 600.
  5416.  
  5417.  MSDOS            Identifies target operating  Always
  5418.                   system as MS-DOS.
  5419.  
  5420.  Syntax           Purpose                      When Defined
  5421.  ────────────────────────────────────────────────────────────────────────────
  5422. 
  5423.  NO_EXT_KEYS      Indicates that               When the /Za option is given
  5424.                   Microsoft-specific language
  5425.                   extensions and extended
  5426.                   keywords are disabled.
  5427.  
  5428.  _QC              Identifies compiler as       Always
  5429.                   Microsoft QuickC.
  5430.  
  5431.  ────────────────────────────────────────────────────────────────────────────
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  4.3.33  /W, /w (Set Warning Level)
  5437.  
  5438.  
  5439.  Options
  5440.  
  5441.    /W{0|1|2|3|4|X}
  5442.    /w
  5443.  
  5444.  You can control the number of warning messages produced by the compiler by
  5445.  using the /w, /W0, /W1, /W2, /W3, /W4, or /WX option. Compiler warning
  5446.  messages are any messages beginning with C4; see Appendix D, "Error
  5447.  Messages," for a complete list of these messages.
  5448.  
  5449.  Warnings indicate potential problems (rather than actual errors) with
  5450.  statements that may not be compiled as you intend.
  5451.  
  5452.  The /W options affect only source files given on the command line; they do
  5453.  not apply to object files.
  5454.  
  5455.  The following list describes the warning-level options:
  5456.  
  5457.  Option                            Action
  5458.  ────────────────────────────────────────────────────────────────────────────
  5459.  /w                                Turns off all warning messages. Use this
  5460.                                    option when you compile programs that
  5461.                                    deliberately include questionable
  5462.                                    statements. The /W0 option applies to
  5463.                                    the remainder of the command line or
  5464.                                    until the next occurrence of a /W option
  5465.                                    on the command line.
  5466.  
  5467.  /w0                               Same as /w.
  5468.  
  5469.  /W1                               The default. Displays severe warning
  5470.                                    messages.
  5471.  
  5472.  /W2                               Displays an intermediate level of
  5473.                                    warning messages. Level-2 warnings may
  5474.                                    or may not indicate serious problems.
  5475.                                    They include warnings such as the
  5476.                                    following:
  5477.  
  5478.                                    ■ Use of functions with no declared
  5479.                                    return type
  5480.  
  5481.                                    ■ Failure to put return statements in
  5482.                                    functions with non-void return types
  5483.  
  5484.                                    ■ Data conversions that would cause loss
  5485.                                    of data or precision
  5486.  
  5487.  /W3                               Displays a higher level of warning
  5488.                                    messages, including warnings about
  5489.                                    function calls that precede their
  5490.                                    function prototypes in the source code.
  5491.  
  5492.  /W4                               Displays the highest level of warning
  5493.                                    messages, including warnings about the
  5494.                                    use of non-ANSI features and extended
  5495.                                    keywords.
  5496.  
  5497.  /WX                               Treats all warnings as fatal errors. If
  5498.                                    there are any warning messages, the
  5499.                                    compilation aborts and QCL does not
  5500.                                    produce an object file.
  5501.  
  5502.  ────────────────────────────────────────────────────────────────────────────
  5503.  NOTE
  5504.  The descriptions of the warning messages in Appendix D indicate the warning
  5505.  level that must be set (that is, the number for the appropriate /W option)
  5506.  for the message to appear.
  5507.  ────────────────────────────────────────────────────────────────────────────
  5508.  
  5509.  
  5510.  Example
  5511.  
  5512.    QCL /W4 CRUNCH.C PRINT.C
  5513.  
  5514.  This example enables all possible warning messages when the source files
  5515.  CRUNCH.C and PRINT.C are compiled.
  5516.  
  5517.  
  5518.  4.3.34  /X (Ignore Standard Include Directory)
  5519.  
  5520.  You can prevent the QuickC compiler from searching the standard places for
  5521.  include files by using the /X (for "exclude") option. When QCL sees the /X
  5522.  option, it does not search the current directory or any directories
  5523.  specified in the INCLUDE environment variable.
  5524.  
  5525.  You can use this option with the /I option to define the location of include
  5526.  files that have the same names as include files found in other directories
  5527.  but that contain different definitions. See Section 4.3.21 for an example of
  5528.  /X used with /I.
  5529.  
  5530.  
  5531.  4.3.35  /Ze, /Za (Enable or Disable Language Extensions)
  5532.  
  5533.  Microsoft QuickC supports the ANSI C standard. In addition, it offers a
  5534.  number of features beyond those specified in the ANSI C standard. These
  5535.  features are enabled when the /Ze (default) option is in effect and disabled
  5536.  when the /Za option is in effect. They include the following:
  5537.  
  5538.  
  5539.  
  5540.    ■   The _cdecl, _far, _fortran, _huge, _near, and _pascal keywords
  5541.  
  5542.    ■   Use of casts to produce lvalues:
  5543.  
  5544.        int *p;
  5545.        ((long *)p)++;
  5546.  
  5547.  
  5548.        The preceding example could be rewritten to conform with the ANSI C
  5549.        standard:
  5550.  
  5551.        p = (int *)((long *)p + 1);
  5552.  
  5553.    ■   Redefinitions of extern items as static:
  5554.  
  5555.        extern int foo();
  5556.        static int foo()
  5557.        {}
  5558.  
  5559.  
  5560.    ■   Use of trailing commas (,) rather than an ellipsis (...) in function
  5561.        declarations to indicate variable-length argument lists:
  5562.  
  5563.        int printf(char *,);
  5564.  
  5565.  
  5566.    ■   Benign typedef redefinitions within the same scope:
  5567.  
  5568.        typedef int INT;
  5569.        typedef int INT;
  5570.  
  5571.  
  5572.    ■   Use of mixed character and string constants in an initializer:
  5573.  
  5574.        char arr[5] = {'a', 'b', "cde"};
  5575.  
  5576.  
  5577.    ■   Use of bit fields with base types other than unsigned int or signed
  5578.        int
  5579.  
  5580.    ■   Use of single-line comments, which are introduced with two slash
  5581.        characters:
  5582.  
  5583.        // This is a single-line comment.
  5584.  
  5585.  
  5586.    ■   Casting of a function pointer to a data pointer:
  5587.  
  5588.        int (* pfunc) ();
  5589.        int *pdata;
  5590.  
  5591.        pdata = (int *) pfunc;
  5592.  
  5593.  
  5594.        To perform the same cast while maintaining ANSI compatibility, you
  5595.        must cast the function pointer to an int before casting it to a data
  5596.        pointer:
  5597.  
  5598.        pdata = (int *) (int) pfunc;
  5599.  
  5600.  
  5601.  Use the /Za option if you plan to port your program to other environments.
  5602.  The /Za option tells the compiler to treat extended keywords as simple
  5603.  identifiers and disable the other extensions listed above.
  5604.  
  5605.  When you specify /Za, the compiler automatically defines the identifier
  5606.  NO_EXT_KEYS. In the include files provided with the QuickC run-time library,
  5607.  this identifier is used with #ifndef to control use of the _cdecl keyword on
  5608.  library function prototypes. For an example of this conditional compilation,
  5609.  see the file STDIO.H.
  5610.  
  5611.  
  5612.  4.3.36  /Zi, /Zd (Compile for Debugging)
  5613.  
  5614.  The /Zi option produces an object file containing full symbolic-debugging
  5615.  information for use with the QuickC debugger and the CodeView
  5616.  window-oriented debugger. This object file includes full symbol-table
  5617.  information and line numbers.
  5618.  
  5619.  The /Zd option produces an object file containing line-number records
  5620.  corresponding to the line numbers of the source file. Use /Zd if you plan to
  5621.  debug with the SYMDEB debugger. Also use this option when you want to reduce
  5622.  the size of an executable file that you will be debugging with the CodeView
  5623.  debugger and when you do not need to use the expression evaluator during
  5624.  debugging.
  5625.  
  5626.  
  5627.  Example
  5628.  
  5629.    QCL /c /Zi TEST.C
  5630.  
  5631.  This command produces an object file named TEST.OBJ that contains line
  5632.  numbers corresponding to the lines in TEST.C.
  5633.  
  5634.  
  5635.  4.3.37  /Zl (Remove Default-Library Name from Object File)
  5636.  
  5637.  Ordinarily, QCL puts the name of the default library (SLIBCE.LIB) in the
  5638.  object file so that the linker can automatically find the correct library to
  5639.  link with the object file.
  5640.  
  5641.  The /Zl option tells the compiler not to place the default-library name in
  5642.  the object file. As a result, the object file is slightly smaller.
  5643.  
  5644.  Use the /Zl option when you are using the LIB utility (described in Chapters
  5645.  2 and 6) to build a library. You can use /Zl to compile the object files you
  5646.  plan to put in your library, thereby omitting the default-library names from
  5647.  your object modules. Although the /Zl option saves only a small amount of
  5648.  space for a single object file, the total amount of space saved is
  5649.  significant in a library containing many object modules.
  5650.  
  5651.  
  5652.  Example
  5653.  
  5654.    QCL ONE.C /Zl TWO.C
  5655.  
  5656.  The example above creates the following two object files:
  5657.  
  5658.  
  5659.    1.  An object file named ONE.OBJ that contains the name of the C library
  5660.        SLIBCE.LIB
  5661.  
  5662.    2.  An object file named TWO.OBJ that contains no default-library
  5663.        information
  5664.  
  5665.  
  5666.  When ONE.OBJ and TWO.OBJ are linked, the default-library information in
  5667.  ONE.OBJ causes the default library to be searched for any unresolved
  5668.  references in either ONE.OBJ or TWO.OBJ.
  5669.  
  5670.  
  5671.  4.3.38  /Zp (Pack Structure Members)
  5672.  
  5673.  
  5674.  Option
  5675.  
  5676.    /Zp«{1|2|4}»
  5677.  
  5678.  When storage is allocated for structures, structure members are ordinarily
  5679.  stored as follows:
  5680.  
  5681.  
  5682.    ■   Items of type char or unsigned char, or arrays containing items of
  5683.        these types, are byte aligned.
  5684.  
  5685.    ■   Structures are word aligned; structures of odd size are padded to an
  5686.        even number of bytes.
  5687.  
  5688.    ■   All other types of structure members are word aligned.
  5689.  
  5690.  
  5691.  To conserve space or to conform to existing data structures, you may want to
  5692.  store structures more or less compactly. The /Zp option and the pack pragma
  5693.  control how structure data are packed into memory.
  5694.  
  5695.  Use the /Zp option to specify the same packing for all structures in a
  5696.  module. When you give the /Zpn option, where n is 1, 2, or 4, each structure
  5697.  member after the first is stored on n-byte boundaries depending on the
  5698.  option you choose. If you use the /Zp option without an argument, structure
  5699.  members are packed on two-byte boundaries.
  5700.  
  5701.  On some processors, the /Zp option may result in slower program execution
  5702.  because of the time required to unpack structure members when they are
  5703.  accessed. For example, on an 8086 processor, this option can reduce
  5704.  efficiency if members with int or long type are packed in such a way that
  5705.  they begin on odd-byte boundaries.
  5706.  
  5707.  Use the pack pragma in your source code to pack particular structures on
  5708.  boundaries different from the packing specified on the command line. Give
  5709.  the pack(n) pragma, where n is 1, 2, or 4, before structures that you want
  5710.  to pack differently. To reinstate the packing given on the command line,
  5711.  give the pack() pragma with no arguments.
  5712.  
  5713.  Table 4.6 shows the interaction of the /Zp option with the pack pragma.
  5714.  
  5715.  Table 4.6  Using the pack Pragma
  5716.  
  5717. ╓┌─────────────────────┌─────────────────────────┌───────────────────────────╖
  5718.                        Compiled with /Zp
  5719.  Syntax                Option?                   Action
  5720.  ────────────────────────────────────────────────────────────────────────────
  5721.  #pragma pack()        Yes                       Reverts to packing
  5722.                                                  specified on the command
  5723.                                                  line for structures that
  5724.                                                  follow
  5725.  
  5726.  #pragma pack()        No                        Reverts to default packing
  5727.                                                  for structures that follow
  5728.  
  5729.  #pragma pack(n)       Yes or no                 Packs the following
  5730.                                                  structures to the given
  5731.                                                  byte boundary until
  5732.                                                  changed or disabled
  5733.  
  5734.  ────────────────────────────────────────────────────────────────────────────
  5735.                        Compiled with /Zp
  5736.  Syntax                Option?                   Action
  5737.  ────────────────────────────────────────────────────────────────────────────
  5738. ────────────────────────────────────────────────────────────────────────────
  5739.  
  5740.  
  5741.  
  5742.  
  5743.  Example
  5744.  
  5745.    QCL /Zp PROG.C
  5746.  
  5747.  This command causes all structures in the program PROG.C to be stored
  5748.  without extra space for alignment of members on int boundaries.
  5749.  
  5750.  
  5751.  4.3.39  /Zr (Check Pointers)
  5752.  
  5753.  The /Zr option checks for null or out-of-range pointers in your program. A
  5754.  run-time error occurs if you try to run a program with such pointers.
  5755.  
  5756.   #pragma check_pointer
  5757.  
  5758.  If you compile with the /Zr option, you can use the check_pointer pragma
  5759.  within your source file to turn checking on or off only for selected
  5760.  pointers leaving the default (see below) for the remaining pointers in the
  5761.  program. When you want to turn on pointer checking, put the following line
  5762.  before the usage of the pointer you want to check:
  5763.  
  5764.    #pragma check_pointer (on)
  5765.  
  5766.  This line turns on pointer checking for all pointers that follow it in the
  5767.  source file, not just the pointers on the following line. To turn off
  5768.  pointer checking, insert the following line:
  5769.  
  5770.    #pragma check_pointer (off)
  5771.  
  5772.  If you don't give an argument for the check_pointer pragma, pointer checking
  5773.  reverts to the behavior specified on the command line: turned on if the /Zr
  5774.  option is given or turned off otherwise.
  5775.  
  5776.  
  5777.  Example
  5778.  
  5779.    QCL /Zr prog.c
  5780.  
  5781.  This command causes QCL to check for null or out-of-range pointers in the
  5782.  file prog.c. All pointers in the file are checked except those to which a
  5783.  check_pointer(off) pragma applies.
  5784.  
  5785.  
  5786.  4.3.40  /Zs (Check Syntax Only)
  5787.  
  5788.  The /Zs option tells the compiler to check only the syntax of the source
  5789.  files that follow the option on the command line. This option provides a
  5790.  quick way to find and correct syntax errors before you try to compile and
  5791.  link a source file.
  5792.  
  5793.  When you give the /Zs option, the compiler does not generate code or produce
  5794.  object files, object listings, or executable files. The compiler, however,
  5795.  does display error messages if the source file has syntax errors.
  5796.  
  5797.  
  5798.  Example
  5799.  
  5800.    QCL /Zs TEST*.C
  5801.  
  5802.  This command causes the compiler to perform a syntax check on all source
  5803.  files in the current working directory that begin with TEST and end with the
  5804.  .C extension. The compiler displays messages for any errors found.
  5805.  
  5806.  
  5807.  4.3.41  Giving Options with the CL Environment Variable
  5808.  
  5809.  Use the CL environment variable to specify files and options without giving
  5810.  them on the command line. This variable has the following format:
  5811.  
  5812.    SET CL=« «option» ... «file» ...» «/link « link-libinfo» »
  5813.  
  5814.  Use this variable if you usually give a large number of files and options
  5815.  when you compile. Ordinarily, DOS limits the command line to 128 characters.
  5816.  The files and options that you define with the CL environment variable,
  5817.  however, do not count toward this limit. Therefore, you can define the files
  5818.  and options you use most often with the CL variable and then give only the
  5819.  files and options you need for specific purposes on the command line.
  5820.  
  5821.  The information defined in the CL variable is treated as though it appeared
  5822.  before the information given on the QCL command line, as illustrated in
  5823.  Figure 4.3.
  5824.  
  5825.  (This figure may be found in the printed book.)
  5826.  
  5827.  Note that if you have given an option in the CL environment variable, you
  5828.  generally cannot turn off or change the option from the command line. You
  5829.  must reset the CL environment variable and omit the file or option that you
  5830.  do not want to use.
  5831.  
  5832.  Also note that you cannot use CL to set options that use an equal sign (for
  5833.  example, the /Didentifier= string option), and you cannot use wild-card
  5834.  characters in file names to specify multiple files with CL.
  5835.  
  5836.  
  5837.  Examples
  5838.  
  5839.  In the following example, the CL environment variable tells the QCL command
  5840.  to use the /Zp, /Ox, and /I options during compilation and then to link with
  5841.  the object file \LIB\BINMODE.OBJ.
  5842.  
  5843.    SET CL=/Zp /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ
  5844.    QCL INPUT.C
  5845.  
  5846.  With CL defined as shown, the QCL command above has the same effect as the
  5847.  command line
  5848.  
  5849.    QCL /Zp /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ INPUT.C
  5850.  
  5851.  That is, both specify structure packing on two-byte boundaries; perform
  5852.  maximum optimizations; search for include files in the \INCLUDE\MYINCLS
  5853.  directory; and suppress translation of carriage-return-line-feed character
  5854.  combinations for the source file INPUT.C.
  5855.  
  5856.  In the following example, the CL environment variable tells the QCL command
  5857.  to compile and link the source files FILE1.C and FILE2.C.
  5858.  
  5859.    SET CL=FILE1.C FILE2.C
  5860.    QCL FILE3.OBJ
  5861.  
  5862.  The QCL command line above has the same effect as the command line
  5863.  
  5864.    QCL FILE1.C FILE2.C FILE3.OBJ
  5865.  
  5866.  The following example illustrates how to turn off the effects of a QCL
  5867.  option defined in the environment.
  5868.  
  5869.    SET CL=/Za
  5870.    QCL FILE1.C /Ze FILE2.C
  5871.  
  5872.  In this example, the CL environment variable is set to the /Za option, which
  5873.  tells the compiler not to recognize Microsoft extensions to the C language.
  5874.  This option causes Microsoft-specific keywords to be treated as ordinary
  5875.  identifiers rather than reserved words. The QCL command specifies the
  5876.  inverse option, /Ze, which tells the compiler to treat language extensions
  5877.  as reserved words. Since the effect is the same as compiling with the
  5878.  command line
  5879.  
  5880.    QCL /Za FILE1.C /Ze FILE2.C
  5881.  
  5882.  FILE1.C is compiled with language extensions turned off and FILE2.C is
  5883.  compiled with language extensions enabled.
  5884.  
  5885.  
  5886.  4.4  Controlling Stack and Heap Allocation
  5887.  
  5888.  The "stack" and the "heap" are two important memory areas that are allocated
  5889.  for QuickC programs. The stack is used for all local data (that is, data
  5890.  that are defined within a function); the heap is used for all dynamically
  5891.  allocated data (that is, data allocated by one of the alloc family of
  5892.  functions).
  5893.  
  5894.  Programs compiled and linked with QuickC run with a fixed stack size (the
  5895.  default size is 2,048 bytes). The stack resides above static data, and the
  5896.  heap uses whatever space is left above the stack. For some programs,
  5897.  however, a fixed-stack model may not be ideal; a model where the stack and
  5898.  heap compete for space is more appropriate.
  5899.  
  5900.  Linking with the mVARSTCK.OBJ object files (where m is the first letter of
  5901.  the library you choose) gives you such a model: when the heap runs out of
  5902.  memory, it tries to use available stack space until it runs into the top of
  5903.  the stack. When the allocated space in the heap is freed, it is once again
  5904.  made available to the stack. Note that the stack cannot grow beyond the
  5905.  last-allocated heap item in the stack, or, if there are no heap items in the
  5906.  stack, beyond the size it was given at link time. Furthermore, while the
  5907.  heap can employ unused stack space, the reverse is not true: the stack
  5908.  cannot employ unused heap space.
  5909.  
  5910.  You can change the model used to allocate heap space by linking your program
  5911.  with one of the mVARSTCK.OBJ object files. These files are the small-,
  5912.  medium-, compact-, and large-model versions of a routine that allows the
  5913.  memory-allocation functions (malloc, calloc, _expand, _fmalloc, _nmalloc,
  5914.  and realloc) to allocate items in unused stack space if they run out of
  5915.  other memory. (If you use the huge memory model, link with the large-model
  5916.  object file LVARSTCK.OBJ.)
  5917.  
  5918.  When you link your program with one of the mVARSTCK.OBJ files, do not
  5919.  suppress stack checking with the #check_stack pragma, or with the /Gs or /Ox
  5920.  option. Stack overflow can occur more easily in programs that link with the
  5921.  variable-stack object files, possibly causing errors that would be difficult
  5922.  to detect.
  5923.  
  5924.  
  5925.  Example
  5926.  
  5927.    QCL TEST.C SVARSTCK
  5928.  
  5929.  This command line compiles TEST.C and then links the resulting object module
  5930.  with SVARSTCK.OBJ, the variable-stack object file for small-model programs.
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  Chapter 5  QLINK
  5939.  ────────────────────────────────────────────────────────────────────────────
  5940.  
  5941.  This chapter describes in detail the operation of the Microsoft QuickC
  5942.  Compiler linker (QLINK) and includes an alphabetical reference to the QLINK
  5943.  options.
  5944.  
  5945.  
  5946.  5.1  Overview
  5947.  
  5948.  The QuickC linker (QLINK) combines object files into a single executable
  5949.  file. It can be used with object files compiled or assembled for 8086/8088,
  5950.  80286, 80386, or 80486 machines. The format of input to the linker is the
  5951.  Microsoft Relocatable Object-Module Format (OMF), which is based on the
  5952.  Intel 8086 OMF.
  5953.  
  5954.  The output file from QLINK (that is, the executable file) is not bound to
  5955.  specific memory addresses. Thus, the operating system can load and execute
  5956.  this file at any convenient address. QLINK can produce executable files
  5957.  containing up to one megabyte of code and data.
  5958.  
  5959.  
  5960.  5.2  Invoking QLINK
  5961.  
  5962.  Instead of using the QCL command to invoke the linker, you can use the QLINK
  5963.  command to invoke QLINK directly. You can specify the input required for
  5964.  this command in one of three ways:
  5965.  
  5966.  
  5967.    1.  By placing it on the command line.
  5968.  
  5969.    2.  By responding to prompts.
  5970.  
  5971.    3.  By specifying a file containing responses to prompts. This type of
  5972.        file is known as a "response file."
  5973.  
  5974.  
  5975.  Regardless of how you invoke QLINK, you can press CTRL+C at any time to
  5976.  terminate a QLINK operation and exit to DOS.
  5977.  
  5978.  You can use any combination of uppercase and lowercase letters for the file
  5979.  names you specify on the QLINK command line or give in response to the QLINK
  5980.  command prompts.
  5981.  
  5982.  If you specify file names without extensions, QLINK uses the following
  5983.  default file-name extensions:
  5984.  
  5985.  File Type                         Default Extension
  5986.  ────────────────────────────────────────────────────────────────────────────
  5987.  Object                            .OBJ
  5988.  
  5989.  Executable                        .EXE
  5990.  
  5991.  Map (or "Listing")                .MAP
  5992.  
  5993.  Library                           .LIB
  5994.  
  5995.  You can override the default extension for a particular command-line field
  5996.  or prompt by specifying a different extension. To enter a file name that has
  5997.  no extension, type the name followed by a period.
  5998.  
  5999.  
  6000.  5.2.1  Command Line
  6001.  
  6002.  Use the following form of the QLINK command to specify input on the command
  6003.  line:
  6004.  
  6005.    QLINK «linkoptions» objfiles «,  «exefile» «, «mapfile» «, «libraries» » »
  6006.    » «;»
  6007.  
  6008.  Commas must separate command-line fields. You can omit the text from any
  6009.  field (except the required objfiles), but you must include the comma. A
  6010.  semicolon can end the command line after any field causing QLINK to use
  6011.  defaults for the remaining fields. See Section 5.2.1.6 for details of QLINK
  6012.  defaults.
  6013.  
  6014.  The command-line fields are explained below.
  6015.  
  6016.  
  6017.  5.2.1.1  QLINK Options
  6018.  
  6019.  You can specify command-line options after any field but before the comma
  6020.  that terminates the field. You do not have to give any options when you run
  6021.  the linker. Linker options are described in Section 5.4.
  6022.  
  6023.  
  6024.  5.2.1.2  Object Files
  6025.  
  6026.  The objfiles field allows you to specify the names of the object files you
  6027.  are linking. You must specify at least one object-file name. A space or plus
  6028.  sign (+) must separate each pair of object-file names. QLINK automatically
  6029.  supplies the .OBJ extension when you give a file name without an extension.
  6030.  If your object file has
  6031.  
  6032.  a different extension or if it appears in another directory or on another
  6033.  disk, you must give the full name─including the extension and path name─for
  6034.  the file to be found. If QLINK cannot find a given object file and the drive
  6035.  associated with the object file is a removable-disk (floppy) drive, then
  6036.  QLINK displays a message and waits for you to change disks.
  6037.  
  6038.  You can also specify one or more libraries in the objfiles field. To enter a
  6039.  library in this field, make sure that you include the .LIB extension;
  6040.  otherwise, QLINK assumes the .OBJ extension. Libraries entered in this field
  6041.  are called "load libraries." QLINK automatically links in every object
  6042.  module in a load library; it does not search for unresolved external
  6043.  references first. The effect of entering a load library is exactly the same
  6044.  as if you had entered the names of all the library's object modules in the
  6045.  objfiles field. This feature is useful if you are developing software using
  6046.  many object files and wish to avoid typing the name of each file on the
  6047.  QLINK command line.
  6048.  
  6049.  
  6050.  5.2.1.3  Executable File
  6051.  
  6052.  The exefile field allows you to specify the name of the executable file. If
  6053.  the file name you give does not have an extension, QLINK automatically adds
  6054.  .EXE as the extension. You can give any file name you like. However, if you
  6055.  are specifying an extension, you should always use .EXE because DOS expects
  6056.  executable files to have either this extension or the .COM extension.
  6057.  
  6058.  
  6059.  5.2.1.4  Map File
  6060.  
  6061.  The mapfile field allows you to specify the name of the map file if you are
  6062.  creating one. To include public symbols and their addresses in the map file,
  6063.  specify the /MAP option on the QLINK command line.
  6064.  
  6065.  If you specify a map-file name without an extension, QLINK automatically
  6066.  adds a .MAP extension. QLINK creates the map file in the current working
  6067.  directory unless you specify a path name for the map file.
  6068.  
  6069.  
  6070.  5.2.1.5  Libraries
  6071.  
  6072.  The libraries field allows you to specify the name of one or more libraries
  6073.  that you want linked with the object file(s). When QLINK finds the name of a
  6074.  library in this field, it treats the library as a "regular library"; QLINK
  6075.  links in only those object modules needed to resolve external references.
  6076.  
  6077.  Each time you compile a source file for a high-level language, the compiler
  6078.  places the name of one or more libraries in the object file that it creates;
  6079.  the linker automatically searches for a library with this name (see Section
  6080.  5.2.4). Because of this, you do not need to give library names on the QLINK
  6081.  command line unless you want to search libraries other than the default
  6082.  libraries or libraries in different locations.
  6083.  
  6084.  When you link your program with a library, the linker pulls into your
  6085.  executable file any library modules that your program references. If the
  6086.  library modules have external references to other library modules, the
  6087.  linker links your program with those other library modules as well.
  6088.  
  6089.  
  6090.  5.2.1.6  Choosing Defaults
  6091.  
  6092.  If you include a comma (to indicate where a field would be) but do not put a
  6093.  file name before the comma, then QLINK selects the default for that field.
  6094.  However, if you use a comma to include the mapfile field (but do not include
  6095.  a name), then QLINK creates a map file. This file has the same base name as
  6096.  the executable file. Use NUL for the map-file name if you do not want to
  6097.  produce a map file.
  6098.  
  6099.  You can also select default responses by using a semicolon (;). The
  6100.  semicolon tells QLINK to use the defaults for all remaining fields. QLINK
  6101.  ignores anything after the semicolon. If you do not give all file names on
  6102.  the command line or if you do not end the command line with a semicolon, the
  6103.  linker prompts you for the files you omitted. See Section 5.2.2 for a
  6104.  description of these prompts.
  6105.  
  6106.  The list below summarizes the linker's defaults for each field:
  6107.  
  6108.  Field                             Default
  6109.  ────────────────────────────────────────────────────────────────────────────
  6110.  linkoptions                       Assumes no options.
  6111.  
  6112.  exefile                           Creates a file with the base name of the
  6113.                                    first object file and a .EXE extension.
  6114.  
  6115.  mapfile                           Does not create a map file unless you
  6116.                                    include the mapfile field. The field may
  6117.                                    be empty, as in the following command
  6118.                                    line:
  6119.                                    QLINK myfile yourfile, ourfile, ;
  6120.                                    If you include the field, but not a file
  6121.                                    name, QLINK creates a map file with the
  6122.                                    base name of the executable file and the
  6123.                                    .MAP extension. Thus the example creates
  6124.                                    a map file named OURFILE.MAP.
  6125.  
  6126.  libraries                         Searches only the default libraries
  6127.                                    specified in the object files.
  6128.  
  6129.  If you do not specify a drive or directory for a file, the linker assumes
  6130.  that the file is on the current drive and directory. If you want the linker
  6131.  to create files in a location other than the current drive and directory,
  6132.  you must specify the new drive and directory for each such file on the
  6133.  command line.
  6134.  
  6135.  
  6136.  Examples
  6137.  
  6138.    QLINK SPELL+TEXT+DICT+THES, ,SPELLIST, XLIB.LIB
  6139.  
  6140.  The command line above causes QLINK to load and link the object files
  6141.  SPELL.OBJ, TEXT.OBJ, DICT.OBJ, and THES.OBJ, and to search for unresolved
  6142.  references in the library file, XLIB.LIB, and the default libraries. By
  6143.  default, QLINK gives the executable file that it produces the name
  6144.  SPELL.EXE. QLINK also produces a map file, SPELLIST.MAP. Note that a
  6145.  semicolon is not required because a library is specified.
  6146.  
  6147.    QLINK SPELL,,;
  6148.  
  6149.  The QLINK command line shown above produces a map file SPELL.MAP because a
  6150.  comma appears as a placeholder for the mapfile specification on the command
  6151.  line.
  6152.  
  6153.    QLINK SPELL,;
  6154.  
  6155.  QLINK SPELL;
  6156.  
  6157.  The two command lines above do not produce a map file because commas do not
  6158.  appear as placeholders for the mapfile specification.
  6159.  
  6160.    QLINK MAIN+GETDATA+PRINTIT, , MAIN;
  6161.  
  6162.  The command above causes QLINK to link the three files MAIN.OBJ,
  6163.  GETDATA.OBJ, and PRINTIT.OBJ into an executable file. QLINK also produces a
  6164.  map file named MAIN.MAP.
  6165.  
  6166.  
  6167.  5.2.2  Prompts
  6168.  
  6169.  If you want the linker to prompt you for input, start QLINK by entering
  6170.  
  6171.    QLINK
  6172.  
  6173.  at the DOS prompt. QLINK also displays prompts if you type an incomplete
  6174.  command line that does not end with a semicolon or if a response file is
  6175.  missing any required responses (see Section 5.2.3) .
  6176.  
  6177.  QLINK prompts you for the input it needs by displaying the following lines,
  6178.  one at a time. The items in square brackets are the defaults QLINK applies
  6179.  if you press ENTER in response to the prompt. (You must supply at least one
  6180.  object-file name for the "Object Modules" prompt.) QLINK waits for you to
  6181.  respond to each prompt before it displays the next one.
  6182.  
  6183.    Object Modules [.OBJ]:
  6184.    Run File [basename.EXE]:
  6185.    List File [NUL.MAP]:
  6186.    Libraries [.LIB]:
  6187.  
  6188.  Note that the default for the  Run File  prompt is the base name of the
  6189.  first object file with the .EXE extension.
  6190.  
  6191.  The responses you give to the QLINK command prompts correspond to the fields
  6192.  on the QLINK command line as follows:
  6193.  
  6194.  Prompt                            Command-Line Field
  6195.  ────────────────────────────────────────────────────────────────────────────
  6196.  "Object Modules"                  objfiles
  6197.  
  6198.  "Run File"                        exefile
  6199.  
  6200.  "List File"                       mapfile
  6201.  
  6202.  "Libraries"                       libraries
  6203.  
  6204.   Continuation character (+)
  6205.  
  6206.  If you type a plus sign (+) as the last character on a response line, the
  6207.  same prompt appears on the next line; you can then continue typing
  6208.  responses. The plus sign must appear at the end of a complete file or
  6209.  library name, path name, or drive name.
  6210.  
  6211.   Choosing defaults
  6212.  
  6213.  To select the default response to the current prompt, press ENTER without
  6214.  giving a file name. The next prompt appears.
  6215.  
  6216.  To select default responses to the current prompt and all remaining prompts,
  6217.  type a semicolon (;) and press ENTER. You can enter the semicolon by itself,
  6218.  or place it after your response to the current prompt. After you type a
  6219.  semicolon, you cannot respond to any of the remaining prompts for that link
  6220.  session. This option saves time when you want the default responses. Note,
  6221.  however, that because there is no default response for that prompt, you
  6222.  cannot enter only a semicolon in response to the "Object Modules" prompt;
  6223.  the linker requires the name of at least one object file.
  6224.  
  6225.  The following list shows the defaults for the other linker prompts:
  6226.  
  6227.  Prompt                            Default
  6228.  ────────────────────────────────────────────────────────────────────────────
  6229.  "Run File"                        The name of the first object file
  6230.                                    submitted at the "Object Modules" prompt,
  6231.                                    with the .EXE extension replacing the
  6232.                                    .OBJ extension
  6233.  
  6234.  "List File"                       The special file name NUL.MAP, which
  6235.                                    tells QLINK not to create a map file
  6236.  
  6237.  "Libraries"                       The default libraries encoded in the
  6238.                                    object files (see Section 5.2.4)
  6239.  
  6240.  
  6241.  5.2.3  Response File
  6242.  
  6243.  A response file contains responses to the QLINK prompts. The responses must
  6244.  be in the same order as the QLINK prompts discussed in the previous section.
  6245.  Each new response must appear on a new line or must begin with a comma;
  6246.  however, you can extend long responses across more than one line by typing a
  6247.  plus sign (+) as the last character of each incomplete line. You can give
  6248.  options at the end of any response or place them on one or more separate
  6249.  lines.
  6250.  
  6251.  QLINK treats the input from the response file just as if you had entered it
  6252.  in response to prompts or on a command line. It treats any new-line
  6253.  character in the response file as if you had pressed ENTER in response to a
  6254.  prompt or included a comma in a command line. (This mechanism is illustrated
  6255.  in Figure 5.1.) For compatibility with OS/2 versions of the linker, it is
  6256.  recommended that all linker response files end with a semicolon after the
  6257.  last line.
  6258.  
  6259.  (This figure may be found in the printed book.)
  6260.  
  6261.  To use the linker with a response file, create the response file, then type
  6262.  the following command:
  6263.  
  6264.    QLINK @responsefile
  6265.  
  6266.  Here responsefile specifies the name or path name of the response file for
  6267.  the linker. You can also enter the name of a response file, preceded by an
  6268.  "at" sign (@), after any QLINK command prompt or at any position in the
  6269.  QLINK command line; in this case, the response file completes the remaining
  6270.  input.
  6271.  
  6272.   Options and command characters
  6273.  
  6274.  You can use options and command characters in the response file in the same
  6275.  way you would use them in responses you type at the keyboard. For example,
  6276.  if you type a semicolon on the line of the response file corresponding to
  6277.  the "Run File" prompt, QLINK uses the default responses for the executable
  6278.  file and for the remaining prompts.
  6279.  
  6280.   Prompts
  6281.  
  6282.  When you enter the QLINK command with a response file, each QLINK prompt is
  6283.  displayed on your screen with the corresponding response from your response
  6284.  file. If the response file does not include a line with a file name,
  6285.  semicolon, or carriage return for each prompt, QLINK displays the
  6286.  appropriate prompt and waits for you to enter a response. When you type an
  6287.  acceptable response, QLINK continues.
  6288.  
  6289.  
  6290.  Example
  6291.  
  6292.  Assume that the following response file is named SPELL.LNK:
  6293.  
  6294.    SPELL+TEXT+DICT+THES
  6295.    /PAUSE /MAP
  6296.    SPELLIST
  6297.    XLIB.LIB;
  6298.  
  6299.  You can type the following command to run QLINK and tell it to use the
  6300.  responses in SPELL.LNK:
  6301.  
  6302.    QLINK @SPELL.LNK
  6303.  
  6304.  The response file tells QLINK to load the four object files SPELL, TEXT,
  6305.  DICT, and THES. QLINK produces an executable file named SPELL.EXE and a map
  6306.  file named SPELLIST.MAP. The /PAUSE option tells QLINK to pause before it
  6307.  produces the executable file so that you can swap disks, if necessary. The
  6308.  /MAP option tells QLINK to include public symbols and addresses in the map
  6309.  file. QLINK also links any needed routines from the library file XLIB.LIB.
  6310.  The semicolon is included after the library name for compatibility with the
  6311.  OS/2 version of the linker.
  6312.  
  6313.  
  6314.  5.2.4  How QLINK Searches for Libraries
  6315.  
  6316.  QLINK searches for libraries that are specified in either of the following
  6317.  ways:
  6318.  
  6319.  
  6320.    ■   In the libraries field on the command line or in response to the
  6321.        "Libraries" prompt.
  6322.  
  6323.    ■   By an object file. The QuickC compiler writes the name of a default
  6324.        combined library in each object file it creates.
  6325.  
  6326.  ────────────────────────────────────────────────────────────────────────────
  6327.  NOTE
  6328.  
  6329.  The material in this section does not apply to libraries that QLINK finds in
  6330.  the objfiles field, either on the command line or in response to the "Object
  6331.  Modules" prompt. Those libraries are treated simply as a series of object
  6332.  files, and QLINK does not conduct extensive searches in such cases.
  6333.  ────────────────────────────────────────────────────────────────────────────
  6334.  
  6335.  
  6336.  
  6337.  
  6338.   Library name with path specification
  6339.  
  6340.  If the library name includes a path specification, QLINK searches only that
  6341.  directory for the library. Libraries specified by object files (that is,
  6342.  default libraries) normally do not include a path specification.
  6343.  
  6344.   Library name without path specification
  6345.  
  6346.  If the library name does not include a path specification, QLINK searches
  6347.  the following locations, in the order shown, to find the library file:
  6348.  
  6349.  
  6350.    1.  The current directory
  6351.  
  6352.    2.  Any path specifications or drive names that you give on the command
  6353.        line or type in response to the "Libraries" prompt, in the order in
  6354.        which they appear
  6355.  
  6356.    3.  The locations given by the LIB environment variable
  6357.  
  6358.  
  6359.  Because object files created by the QuickC compiler contain the names of all
  6360.  the standard libraries you need, you are not required to specify a library
  6361.  on the QLINK command line or in response to the QLINK "Libraries" prompt
  6362.  unless you want to do one of the following:
  6363.  
  6364.  
  6365.    ■   Add the names of additional libraries to be searched
  6366.  
  6367.    ■   Search for libraries in different locations
  6368.  
  6369.    ■   Override the use of one or more default libraries
  6370.  
  6371.  
  6372.  For example, if you have developed your own customized libraries, you might
  6373.  want to include one or more of them as additional libraries at linking time.
  6374.  
  6375.  
  6376.  
  6377.  5.2.4.1  Searching Additional Libraries
  6378.  
  6379.  You can tell QLINK to search additional libraries by specifying one or more
  6380.  library files on the command line or in response to the "Libraries" prompt.
  6381.  QLINK searches these libraries in the order you specify before it searches
  6382.  default libraries.
  6383.  
  6384.  QLINK automatically supplies the .LIB extension if you omit it from a
  6385.  library-file name. If you want to link a library file that has a different
  6386.  extension, be sure to specify the extension.
  6387.  
  6388.  
  6389.  5.2.4.2  Searching Different Locations for Libraries
  6390.  
  6391.  You can tell QLINK to search additional locations for libraries by giving a
  6392.  drive name or path specification in the libraries field on the command line
  6393.  or in response to the "Libraries" prompt. Each path must end with a
  6394.  backslash. You can specify up to 32 additional paths. If you give more than
  6395.  32 paths, QLINK ignores the additional paths without displaying an error
  6396.  message.
  6397.  
  6398.  
  6399.  5.2.4.3  Overriding Libraries Named in Object Files
  6400.  
  6401.  If you do not want to link with the library whose name is included in the
  6402.  object file, you can give the name of a different library instead. You might
  6403.  need to specify a different library name in the following cases:
  6404.  
  6405.  
  6406.    ■   You assigned a custom name to a standard library when you set up your
  6407.        libraries
  6408.  
  6409.    ■   You want to link with a library that supports a different math package
  6410.        than the math package you gave on the compiler command line (or the
  6411.        default)
  6412.  
  6413.  
  6414.  If you specify a new library name on the QLINK command line, the linker
  6415.  searches the new library to resolve external references before it searches
  6416.  the library specified in the object file.
  6417.  
  6418.  If you want the linker to ignore the library whose name is included in the
  6419.  object file, you must use the /NOD option. This option tells QLINK to ignore
  6420.  the default-library information that is encoded in the object files created
  6421.  by high-level-language compilers. Use this option with caution; see Section
  6422.  5.4.14 for more information.
  6423.  
  6424.  
  6425.  Example
  6426.  
  6427.    QLINK
  6428.  
  6429.    Microsoft(R) QuickC Linker  Version 4.10.
  6430.    Copyright(C) Microsoft Corp 1989.  All rights reserved.
  6431.  
  6432.    Object Modules [.OBJ]: SPELL TEXT DICT THES
  6433.    Run File [SPELL.EXE]:
  6434.    List File [NUL.MAP]:
  6435.    Libraries [.LIB]: C:\TESTLIB\ NEWLIBV3
  6436.  
  6437.  This example links four object files to create an executable file named
  6438.  SPELL.EXE. QLINK searches NEWLIBV3.LIB before searching the default
  6439.  libraries to resolve references. To locate NEWLIBV3.LIB and the default
  6440.  libraries, the linker searches the current working directory, then the
  6441.  C:\TESTLIB\ directory, and finally the locations given by the LIB
  6442.  environment variable.
  6443.  
  6444.  
  6445.  5.3  QLINK Memory Requirements
  6446.  
  6447.  QLINK uses available memory for the link session. If the files to be linked
  6448.  create an output file that exceeds available memory, QLINK creates a
  6449.  temporary disk file to serve as memory. Depending on the DOS version, QLINK
  6450.  handles this temporary file in one of the following ways:
  6451.  
  6452.  
  6453.    ■   For the purpose of creating a temporary file, the linker uses the
  6454.        directory specified by the TMP environment variable. If the TMP
  6455.        variable is set to C:\TEMPDIR, for example, then QLINK puts the
  6456.        temporary file in C:\TEMPDIR.
  6457.  
  6458.        If there is no TMP environment variable or if the directory specified
  6459.        by TMP does not exist, then QLINK puts the temporary file in the
  6460.        current directory.
  6461.  
  6462.    ■   If the linker is running on DOS version 3.0 or later, it uses a DOS
  6463.        system call to create a temporary file with a unique name in the
  6464.        temporary-file directory.
  6465.  
  6466.    ■   If the linker is running on a version of DOS prior to version 3.0, it
  6467.        creates a temporary file named VM.TMP.
  6468.  
  6469.  
  6470.  When the linker creates a temporary disk file, you see the message
  6471.  
  6472.    Temporary file tempfile has been created.
  6473.    Do not change diskette in drive, letter.
  6474.  
  6475.  In the message displayed above, tempfile is ".\" followed by either VM.TMP
  6476.  or a name generated by DOS, and letter is the drive containing the temporary
  6477.  file.
  6478.  
  6479.  If you are running QuickC on a removable-disk system, the message
  6480.  
  6481.    Do not change diskette
  6482.  
  6483.  appears. After this message appears, do not remove the disk from the
  6484.  specified drive until the link session ends. If you remove the disk, the
  6485.  operation of QLINK is unpredictable, and you may see the following message:
  6486.  
  6487.  
  6488.    unexpected end-of-file on scratch file
  6489.  
  6490.  If this happens, rerun the link session. The temporary file created by QLINK
  6491.  is a working file only. QLINK deletes it at the end of the link session.
  6492.  
  6493.  ────────────────────────────────────────────────────────────────────────────
  6494.  NOTE
  6495.  
  6496.  Do not give any of your own files the name VM.TMP. The linker displays an
  6497.  error message if it encounters an existing file with this name.
  6498.  ────────────────────────────────────────────────────────────────────────────
  6499.  
  6500.  
  6501.  5.4  QLINK Options
  6502.  
  6503.  This section explains how to use linker options to specify and control the
  6504.  tasks performed by QLINK.
  6505.  
  6506.  When you use the QLINK command line to invoke QLINK, you can put options at
  6507.  the end of the line or after individual fields on the line. However, options
  6508.  must immediately precede the comma that separates each field from the next.
  6509.  
  6510.  
  6511.  If you respond to the individual prompts for the QLINK command, you can
  6512.  specify linker options at the end of any response. When you use more than
  6513.  one option, you can either group the options at the end of a single response
  6514.  or distribute the options among several responses. Every option must begin
  6515.  with the slash character ( / ), even if other options precede it on the same
  6516.  line.
  6517.  
  6518.  In a response file, options can appear on a line by themselves or after
  6519.  individual response lines.
  6520.  
  6521.   Abbreviations
  6522.  
  6523.  Because linker options are named according to their functions, some of their
  6524.  names are quite long. You can abbreviate the options to save space and
  6525.  effort. Be sure that your abbreviation is unique so that the linker can
  6526.  determine which option you want. The minimum legal abbreviation for each
  6527.  option is indicated in the syntax description of the option.
  6528.  
  6529.  Abbreviations must begin with the first letter of the name and must be
  6530.  continuous through the last letter typed. No gaps or transpositions are
  6531.  allowed. Options can be entered in uppercase or lowercase letters.
  6532.  
  6533.   Numeric arguments
  6534.  
  6535.  Some linker options take numeric arguments. A numeric argument can be any of
  6536.  the following:
  6537.  
  6538.  
  6539.    ■   A decimal number from 0 to 65,535.
  6540.  
  6541.    ■   An octal number from 00 to 0177777. QLINK interprets a number as octal
  6542.        if it starts with 0. For example, the number 10 is interpreted as a
  6543.        decimal number, but the number 010 is interpreted as an octal number,
  6544.        equivalent to 8 in decimal.
  6545.  
  6546.    ■   A hexadecimal number from 0X0 to 0XFFFF. QLINK interprets a number as
  6547.        hexadecimal if it starts with 0X. For example, 0X10 is a hexadecimal
  6548.        number, equivalent to 16 in decimal.
  6549.  
  6550.  
  6551.   LINK environment variable
  6552.  
  6553.  You can use the LINK environment variable to cause certain options to be
  6554.  used each time you link. The linker checks the environment variable for
  6555.  options if the variable exists.
  6556.  
  6557.  The linker expects to find options listed in the variable exactly as you
  6558.  would type them on the command line. It does not accept any other arguments;
  6559.  for instance, including file names in the environment variable causes the
  6560.  error message
  6561.  
  6562.    unrecognized option name
  6563.  
  6564.  Each time you link, you can specify options in addition to those in the LINK
  6565.  environment variable. If you enter the same option both on the command line
  6566.  and in the environment variable, the linker ignores the redundant option. If
  6567.  the options conflict, however, the command-line option overrides the effect
  6568.  of the environment variable option. For example, the command-line option
  6569.  /SE:512 cancels the effect of the environment-variable option /SE:256.
  6570.  
  6571.  ────────────────────────────────────────────────────────────────────────────
  6572.  NOTE
  6573.  
  6574.  The only way to prevent an option in the environment variable from being
  6575.  used is to reset the environment variable itself.
  6576.  ────────────────────────────────────────────────────────────────────────────
  6577.  
  6578.  
  6579.  Example
  6580.  
  6581.    >SET LINK=/NOI /SE:256 /CO
  6582.  
  6583.    >QLINK TEST;
  6584.  
  6585.    >QLINK /NOD /CO PROG;
  6586.  
  6587.  In the example above, the file TEST.OBJ is linked with the options /NOI,
  6588.  /SE:256, and /CO. The file PROG.OBJ is then linked with the option /NOD, in
  6589.  addition to /NOI, /SE:256, and /CO. Note that the second /CO option is
  6590.  ignored.
  6591.  
  6592.  
  6593.  5.4.1  /BA (Running in Batch Mode)
  6594.  
  6595.  
  6596.  Option
  6597.  
  6598.    /BA«TCH»
  6599.  
  6600.  By default, the linker prompts you for a new path name whenever it can't
  6601.  find a library it has been directed to use. It also prompts you if it cannot
  6602.  find an object file that it expects to find on a removable disk. If you use
  6603.  the /BA option, however, the linker does not prompt you for any libraries or
  6604.  object files that it cannot find. Instead, the linker generates an error or
  6605.  warning message, if appropriate.
  6606.  
  6607.  In addition, when you use /BA, the linker does not display its copyright
  6608.  banner, nor does it echo commands from response files. This option does not
  6609.  prevent the linker from prompting for command-line arguments. You can
  6610.  prevent such prompting only by using a semicolon on the command line or in a
  6611.  response file.
  6612.  
  6613.  Using this option may result in unresolved external references. It is
  6614.  intended primarily for use with batch or NMAKE files that link many
  6615.  executable files with a single command and to prevent linker operation from
  6616.  halting.
  6617.  
  6618.  ────────────────────────────────────────────────────────────────────────────
  6619.  NOTE
  6620.  
  6621.  In previous versions of the linker included with QuickC, the /BATCH option
  6622.  was abbreviated to /B.
  6623.  ────────────────────────────────────────────────────────────────────────────
  6624.  
  6625.  
  6626.  5.4.2  /CO (Link for Debugging)
  6627.  
  6628.  
  6629.  Option
  6630.  
  6631.    /CO«DEVIEW»
  6632.  
  6633.  Use the /CO option to prepare for debugging with the integrated QuickC
  6634.  debugger or the CodeView window-oriented debugger. This option tells the
  6635.  linker to prepare a special executable file containing symbolic data and
  6636.  line-number information.
  6637.  
  6638.  Object files linked with the /CO option must first be compiled with the /Zi
  6639.  option, which is described in Section 4.3.36.
  6640.  
  6641.  You can run this executable file outside the CodeView debugger; the extra
  6642.  data in the file are ignored. To keep file size to a minimum, however, use
  6643.  the special-format executable file only for debugging; then you can link a
  6644.  separate version without the /CO option after you've debugged the program.
  6645.  
  6646.  
  6647.  5.4.3  /CP (Set the Maximum Allocation Space)
  6648.  
  6649.  
  6650.  Option
  6651.  
  6652.    /CP«ARMAXALLOC»:number
  6653.  
  6654.  The /CP option sets the maximum number of 16-byte paragraphs needed by the
  6655.  program when it is loaded into memory. The operating system uses this value
  6656.  when allocating space for the program before loading it. The option is
  6657.  useful when you want to execute another program from within your program and
  6658.  you need to reserve space for that other program.
  6659.  
  6660.  QLINK normally requests the operating system to set the maximum number of
  6661.  paragraphs to 65,535. Since this represents more memory than could be
  6662.  available under DOS, the operating system always denies the request and
  6663.  allocates the largest contiguous block of memory it can find. If you specify
  6664.  the /CP option, the operating system allocates no more space than the option
  6665.  specifies. This means any additional space in memory is free for other
  6666.  programs.
  6667.  
  6668.  The number can be any integer value in the range 1-65,535. If number is less
  6669.  than the minimum number of paragraphs needed by the program, QLINK ignores
  6670.  your request and sets the maximum value equal to whatever the minimum value
  6671.  happens to be. The minimum number of paragraphs needed by a program is
  6672.  
  6673.  never less than the number of paragraphs of code and data in the program. To
  6674.  free more memory for programs compiled in the medium and large memory
  6675.  models, link with /CP:1; this leaves no space for the near heap.
  6676.  
  6677.  
  6678.  5.4.4  /DO (Order Segments)
  6679.  
  6680.  
  6681.  Option
  6682.  
  6683.    /DO«SSEG»
  6684.  
  6685.  The /DO option forces a special ordering on segments. This option is
  6686.  automatically enabled by a special object-module record in Microsoft QuickC
  6687.  libraries. If you are linking to one of these libraries, then you do not
  6688.  need to specify this option.
  6689.  
  6690.  This option is also enabled by assembly modules that use the Microsoft Macro
  6691.  Assembler directive .DOSSEG.
  6692.  
  6693.  The /DO option forces segments to be ordered as follows:
  6694.  
  6695.  
  6696.    1.  All segments with a class name ending in CODE
  6697.  
  6698.    2.  All other segments outside DGROUP
  6699.  
  6700.    3.  DGROUP segments, in the following order:
  6701.  
  6702.  
  6703.  
  6704.    a.  Any segments of class BEGDATA (this class name reserved for Microsoft
  6705.        use)
  6706.  
  6707.    b.  Any segments not of class BEGDATA, BSS, or STACK
  6708.  
  6709.    c.  Segments of class BSS
  6710.  
  6711.    d.  Segments of class STACK
  6712.  
  6713.  
  6714.  When the /DO option is in effect, the linker initializes two special
  6715.  variables as follows:
  6716.  
  6717.    _edata = DGROUP : BSS
  6718.    _end   = DGROUP : STACK
  6719.  
  6720.  The variables _edata and _end have special meanings for the Microsoft C and
  6721.  FORTRAN compilers, so it is not wise to give these names to your own program
  6722.  variables. Assembly modules can reference these variables but should not
  6723.  change them.
  6724.  
  6725.  
  6726.  5.4.5  /DS (Load Data at High Address)
  6727.  
  6728.  
  6729.  Option
  6730.  
  6731.    /DS«ALLOCATE»
  6732.  
  6733.  QLINK normally loads all data starting at the low end of the data segment.
  6734.  At run time, the DS (data segment) register is set to the lowest possible
  6735.  address to allow the entire data segment to be used.
  6736.  
  6737.  Use the /DS option to tell QLINK to load all data starting at the high end
  6738.  of the data segment instead of at the low end. In this case, the DS register
  6739.  is set at run time to the lowest data-segment address that contains program
  6740.  data.
  6741.  
  6742.  You can use the /DS option with the /HI option (see Section 5.4.9) to take
  6743.  advantage of unused memory within the data segment.
  6744.  
  6745.  ────────────────────────────────────────────────────────────────────────────
  6746.  WARNING
  6747.  
  6748.  This option should be used only with assembly-language programs.
  6749.  ────────────────────────────────────────────────────────────────────────────
  6750.  
  6751.  
  6752.  5.4.6  /E (Pack Executable Files)
  6753.  
  6754.  
  6755.  Optionspecific types>
  6756.  
  6757.    /E«XEPACK»
  6758.  
  6759.  The /E option directs QLINK to remove sequences of repeated bytes (typically
  6760.  null characters) and to optimize the load-time-relocation table before
  6761.  creating the executable file. (The load-time-relocation table is a table of
  6762.  references, relative to the start of the program. Each reference changes
  6763.  when the executable image is loaded into memory and an actual address for
  6764.  the entry point is assigned.)
  6765.  
  6766.  Executable files linked with this option may be smaller, and thus load
  6767.  faster, than files linked without this option. Programs with many load-time
  6768.  relocations (about 500 or more) and long streams of repeated characters are
  6769.  usually shorter if packed. The /E option, however, does not always save a
  6770.  significant amount of disk space and may sometimes increase file size. QLINK
  6771.  notifies you if the packed file is larger than the unpacked file.
  6772.  
  6773.  Note that you cannot use the QuickC debugger, the Symbolic Debug Utility
  6774.  (SYMDEB), or the CodeView window-oriented debugger to debug packed files.
  6775.  The /E option strips symbolic information needed by the debuggers from the
  6776.  input file and issues a warning message to notify you.
  6777.  
  6778.  
  6779.  5.4.7  /F (Optimize Far Calls)
  6780.  
  6781.  
  6782.  Option
  6783.  
  6784.    /F«ARCALLTRANSLATION»
  6785.  
  6786.  The /F option directs the linker to optimize far calls to procedures that
  6787.  lie in the same segment as the caller. Using the /F option may result in
  6788.  slightly faster code and smaller executable-file size. It should be used
  6789.  with the /PACKC option (see Section 5.4.23) for significant results. By
  6790.  default, the /F option is off. Furthermore, once you have enabled it, you
  6791.  can disable it for one or more object files by using the /NOF option (see
  6792.  Section 5.4.16).
  6793.  
  6794.  For example, a medium- or large-model program may include a machine
  6795.  instruction that makes a far call to a procedure in the same segment.
  6796.  Because both the instruction and the procedure it calls have the same
  6797.  segment address, only a near call is truly necessary. A near-call
  6798.  instruction does not require an entry in the relocation table; a far-call
  6799.  instruction does. In this situation, use of /F (together with /PACKC)
  6800.  results in a smaller executable file because the relocation table is
  6801.  smaller. Such files load faster.
  6802.  
  6803.  When /F has been specified, the linker optimizes code by removing the
  6804.  following instruction:
  6805.  
  6806.    call FAR label
  6807.  
  6808.  and substituting the sequence
  6809.  
  6810.    push    cs
  6811.    call    NEAR label
  6812.    nop
  6813.  
  6814.  Upon execution, the called procedure still returns with a far-return
  6815.  instruction. Because both the code segment and the near address are on the
  6816.  stack, however, the far return is executed correctly. The  nop  (no-op)
  6817.  instruction appears so that exactly five bytes replace the five-byte
  6818.  far-call instruction; the linker may in some cases place nop at the
  6819.  beginning of the sequence.
  6820.  
  6821.  The /F option has no effect on programs that make only near calls. Of the
  6822.  high-level Microsoft languages, only tiny-, small-, and compact-model C
  6823.  programs use near calls.
  6824.  
  6825.  ────────────────────────────────────────────────────────────────────────────
  6826.  IMPORTANT
  6827.  
  6828.  There is a small risk involved with the /F option: the linker may mistakenly
  6829.  translate a byte in a code segment that happens to have the far-call opcode
  6830.  (9A hexadecimal). If a program linked with /F inexplicably fails, then you
  6831.  may want to try linking with this option off. Object files produced by
  6832.  Microsoft high-level languages, however, should be safe from this problem
  6833.  because relatively little immediate data is stored in code segments.
  6834.  
  6835.  In general, assembly-language programs are also relatively safe for use with
  6836.  the /F option, as long as they do not involve advanced system-level code,
  6837.  such as might be found in operating systems or interrupt handlers.
  6838.  ────────────────────────────────────────────────────────────────────────────
  6839.  
  6840.  
  6841.  5.4.8  /HE (View the Options List)
  6842.  
  6843.  
  6844.  Option
  6845.  
  6846.    /HE«LP»
  6847.  
  6848.  The /HE option causes QLINK to display a list of its options on the screen.
  6849.  This gives you a convenient reminder of the options.
  6850.  
  6851.  When you use this option, QLINK ignores any other input you give and does
  6852.  not create an executable file.
  6853.  
  6854.  
  6855.  5.4.9  /HI (Place Executable in High Memory)
  6856.  
  6857.  
  6858.  Option
  6859.  
  6860.    /HI«GH»
  6861.  
  6862.  The /HI option tells QLINK to place the executable file as high as possible
  6863.  in memory. Without the /HI option, QLINK places the executable file as low
  6864.  in memory as possible.
  6865.  
  6866.  ────────────────────────────────────────────────────────────────────────────
  6867.  WARNING
  6868.  
  6869.  This option should be used only with assembly-language programs.
  6870.  ────────────────────────────────────────────────────────────────────────────
  6871.  
  6872.  
  6873.  5.4.10  /INC (Prepare for ILINK)
  6874.  
  6875.  
  6876.  Option
  6877.  
  6878.    /INC«REMENTAL»
  6879.  
  6880.  Use this option to prepare a program for subsequent incremental linking with
  6881.  ILINK. In incremental linking, only the object files that have changed since
  6882.  the last link are linked. This process is much faster than performing
  6883.  regular linking with QLINK, but it produces larger executable files. The use
  6884.  of this option produces a .SYM file and a .ILK file, each containing extra
  6885.  information needed by ILINK. This option requires that the file ILINKSTB.OVL
  6886.  be in the current directory or the current path.
  6887.  
  6888.  Incremental linking is possible only when small changes have been made to
  6889.  object files. If large changes have been made, ILINK invokes QLINK to
  6890.  perform a full link.
  6891.  
  6892.  Incremental linking has no advantage over regular linking in the beginning
  6893.  of the development process, when large amounts of code are being added. You
  6894.  should use ILINK later in the development process, when only small changes
  6895.  are being made to certain modules. When you have finished all changes and
  6896.  are ready to produce the final .EXE file, you should use QLINK to produce
  6897.  the smallest possible file.
  6898.  
  6899.  Incremental linking is not compatible with the /T (see Section 5.4.30) or /E
  6900.  (see Section 5.4.6) options.
  6901.  
  6902.  
  6903.  5.4.10.1  Incremental Violations
  6904.  
  6905.  ILINK can generate two kinds of errors: real errors and incremental
  6906.  violations. Real errors are errors such as undefined symbols that cannot be
  6907.  resolved by a full link. If ILINK detects a real error, it displays an error
  6908.  message.
  6909.  
  6910.  Incremental violations are caused by code changes that go beyond the scope
  6911.  of incremental linking. When an incremental violation occurs, ILINK invokes
  6912.  QLINK automatically. The following sections describe the incremental
  6913.  violations.
  6914.  
  6915.  
  6916.  Changing Libraries
  6917.  
  6918.  An incremental violation occurs when a library changes. Furthermore, if an
  6919.  altered module shares a code segment with a library, ILINK needs access to
  6920.  the library as well as the altered module.
  6921.  
  6922.  If you add a function, procedure, or subroutine call to a library that has
  6923.  never been called before, ILINK invokes QLINK automatically.
  6924.  
  6925.  
  6926.  Exceeding Code/Data Padding
  6927.  
  6928.  An incremental violation occurs if two or more modules contribute to the
  6929.  same physical segment and either module exceeds its padding. The padding
  6930.  allows the module to increase in size by the specified number of bytes
  6931.  before another full link is required. See Section 5.4.25, "/PADC" and
  6932.  Section 5.4.26, "/PADD."
  6933.  
  6934.  
  6935.  Moving or Deleting Data Symbols
  6936.  
  6937.  An incremental violation occurs if a data symbol is moved or deleted. To add
  6938.  new data symbols without requiring a full link, add the new symbols at the
  6939.  end of all other data symbols in the module.
  6940.  
  6941.  
  6942.  Deleting Code Symbols
  6943.  
  6944.  You can move or add code symbols, but an incremental violation occurs if you
  6945.  delete any code symbols from a module. Code symbols can be moved within a
  6946.  module but cannot be moved between modules.
  6947.  
  6948.  
  6949.  Adding Debugging Information
  6950.  
  6951.  If you are using the CodeView debugger from the Microsoft C Professional
  6952.  Development System version 6.0, you must include CodeView information in
  6953.  your modules when you first specify /INC to prepare for incremental linking.
  6954.  If you add the CodeView information later in the development process, an
  6955.  incremental violation occurs the next time you use ILINK.
  6956.  
  6957.  An incremental violation will also occur if you try to link object files
  6958.  that include CodeView information for the Microsoft C Optimizing Compiler
  6959.  version 5.1.
  6960.  
  6961.  
  6962.  5.4.10.2  ILINK options
  6963.  
  6964.  The options that ILINK accepts are described in the following list:
  6965.  
  6966.  Option                            Action
  6967.  ────────────────────────────────────────────────────────────────────────────
  6968.  /A                                Directs ILINK to check for changes in
  6969.                                    the object files since the last linking
  6970.                                    process.
  6971.  
  6972.  /C                                Specifies case sensitivity.
  6973.  
  6974.  /E "command"                      Specifies command to be executed if
  6975.                                    incremental linking fails. The quotation
  6976.                                    marks are required if there are any
  6977.                                    embedded spaces in the command. The
  6978.                                    default is /E "QLINK /INC".
  6979.  
  6980.  /HE                               Provides help about the incremental
  6981.                                    linker.
  6982.  
  6983.  /I                                Specifies that ILINK should attempt only
  6984.                                    an incremental link and not a regular
  6985.                                    link. If the incremental link fails, a
  6986.                                    fatal error follows the incremental
  6987.                                    violation error.
  6988.  
  6989.  /NOL                              Causes ILINK to suppress the sign-on
  6990.                                    banner.
  6991.  
  6992.  /V                                Directs ILINK to list all changed
  6993.                                    modules.
  6994.  
  6995.  /X                                Prevents ILINK from allocating memory
  6996.                                    from an expanded memory manager if one
  6997.                                    is present.
  6998.  
  6999.  In very unusual cases, linking with /INC may cause the following warning to
  7000.  be generated:
  7001.  
  7002.    frame-relative fix-up, frame ignored near 'offset' in segment 'segment'
  7003.  
  7004.  If this occurs, do not use this option or ILINK.
  7005.  
  7006.  
  7007.  5.4.11  /INF (Display Linker-Process Information)
  7008.  
  7009.  
  7010.  Option
  7011.  
  7012.    /INF«ORMATION»
  7013.  
  7014.  The /INF option tells the linker to display information about the linking
  7015.  process, including the phase of linking and the names of the object files
  7016.  being linked. Use this option if you want to determine the locations of the
  7017.  object files being linked and the order in which they are linked.
  7018.  
  7019.  Output from this option is sent to the standard error output.
  7020.  
  7021.  
  7022.  Example
  7023.  
  7024.  The following is a sample of the linker output when the /INF option is
  7025.  specified on the QLINK command line:
  7026.  
  7027.    **** PASS ONE ****
  7028.    HSTGM.OBJ(hstgm.c)
  7029.    **** LIBRARY SEARCH ****
  7030.    \qc\lib\SLIBCE.LIB(CRT0)
  7031.    \qc\lib\SLIBCE.LIB(CRT0DAT)
  7032.    \qc\lib\SLIBCE.LIB(CRT0MSG)
  7033.    \qc\lib\SLIBCE.LIB(CRT0FP)
  7034.    \qc\lib\SLIBCE.LIB(CHKSTK)
  7035.    \qc\lib\SLIBCE.LIB(CHKSUM)
  7036.    .
  7037.    .
  7038.    .
  7039.  
  7040.    **** ASSIGN ADDRESSES ****
  7041.    **** PASS TWO ****
  7042.    HSTGM.OBJ(hstgm.c)
  7043.    \qc\lib\SLIBCE.LIB(CRT0)
  7044.    \qc\lib\SLIBCE.LIB(CRT0DAT)
  7045.    \qc\lib\SLIBCE.LIB(CRT0MSG)
  7046.    \qc\lib\SLIBCE.LIB(CRT0FP)
  7047.    \qc\lib\SLIBCE.LIB(CHKSTK)
  7048.    \qc\lib\SLIBCE.LIB(CHKSUM)
  7049.    **** WRITING EXECUTABLE ****
  7050.  
  7051.    Segments              31
  7052.    Groups                1
  7053.    Bytes in symbol table  32784
  7054.  
  7055.  
  7056.  5.4.12  /LI (Include Line Numbers in Map File)
  7057.  
  7058.  
  7059.  Option
  7060.  
  7061.    /LI«NENUMBERS»
  7062.  
  7063.  You can include the line numbers and associated addresses of your source
  7064.  program in the map file by using the /LI option. Use this option if you will
  7065.  be debugging with the SYMDEB debugger included with earlier releases of
  7066.  Microsoft language products.
  7067.  
  7068.  Ordinarily, the map file does not contain line numbers. To produce a map
  7069.  file with line numbers, you must give QLINK an object file (or files) with
  7070.  line-number information. The /Zd option of the QCL command (see Section
  7071.  4.3.36) directs the compiler to include line numbers in the object file. If
  7072.  you give QLINK an object file without line-number information, the /LI
  7073.  option has no effect.
  7074.  
  7075.  The /LI option forces QLINK to create a map file even if you did not
  7076.  explicitly tell the linker to create a map file. By default, QLINK gives the
  7077.  file the same base name as the executable file plus the extension .MAP. You
  7078.  can override the default name by specifying a new map file on the QLINK
  7079.  command line or in response to the "List File" prompt.
  7080.  
  7081.  
  7082.  5.4.13  /M (List Public Symbols)
  7083.  
  7084.  
  7085.  Option
  7086.  
  7087.    /M«AP»
  7088.  
  7089.  You can list all public (global) symbols defined in the object file(s) by
  7090.  using the /M option. When you invoke QLINK with the /M option, the map file
  7091.  contains a list of all the symbols sorted by name and a list of all the
  7092.  symbols sorted by address. If you do not use this option, the map file
  7093.  contains only a list of segments.
  7094.  
  7095.  When you use this option, the default for the mapfile field or "List File"
  7096.  prompt response is no longer NUL. Instead, the default is a name that
  7097.  combines the base name of the executable file with a .MAP extension. You can
  7098.  still specify NUL in the mapfile field (which indicates that QLINK should
  7099.  not generate a map file); if you do, the /M option has no effect.
  7100.  
  7101.  ────────────────────────────────────────────────────────────────────────────
  7102.  NOTE
  7103.  
  7104.  In earlier versions of QLINK, number specified the maximum number of public
  7105.  symbols that QLINK could sort; the current version of QLINK sorts the
  7106.  maximum number of symbols that can be sorted in available memory.
  7107.  ────────────────────────────────────────────────────────────────────────────
  7108.  
  7109.  
  7110.  5.4.14  /NOD (Ignore Default Libraries)
  7111.  
  7112.  
  7113.  Option
  7114.  
  7115.    /NOD«EFAULTLIBRARYSEARCH» «:filename»
  7116.  
  7117.  The /NOD option tells QLINK not to search any library specified in the
  7118.  object file to resolve external references. If you specify filename, then
  7119.  QLINK searches all libraries specified in the object file except for
  7120.  filename.
  7121.  
  7122.  In general, higher-level-language programs do not work correctly without a
  7123.  stan-dard library. Therefore, if you use the /NOD option, you should
  7124.  explicitly specify the name of a standard library in the libraries field.
  7125.  
  7126.  
  7127.  5.4.15  /NOE (Ignore Extended Dictionary)
  7128.  
  7129.  
  7130.  Option
  7131.  
  7132.    /NOE«XTDICTIONARY»
  7133.  
  7134.  The /NOE option prevents the linker from searching the extended dictionary,
  7135.  which is an internal list of symbol locations that the linker maintains.
  7136.  Normally, the linker consults this list to speed up library searches. The
  7137.  /NOE option therefore slows down the linker. You often need this option when
  7138.  a library symbol is redefined. Use /NOE if the linker issues the following
  7139.  error message:
  7140.  
  7141.    symbol name multiply defined
  7142.  
  7143.  
  7144.  5.4.16  /NOF (Disable Far-Call Optimization)
  7145.  
  7146.  
  7147.  Option
  7148.  
  7149.    /NOF«ARCALLTRANSLATION»
  7150.  
  7151.  Normally you don't need to specify this option because QLINK doesn't
  7152.  ordinarily perform far-call optimization (translation). However, if an
  7153.  environment variable such as LINK (or CL) turns on far-call translation
  7154.  automatically, you can use /NOF to turn far-call translation off again.
  7155.  
  7156.  
  7157.  5.4.17  /NOG (Preserve Compatibility)
  7158.  
  7159.  
  7160.  Option
  7161.  
  7162.    /NOG«ROUPASSOCIATION»
  7163.  
  7164.  The /NOG option causes the linker to ignore group associations when
  7165.  assigning addresses to data and code items. It is provided primarily for
  7166.  compatibility with previous versions of the linker (versions 2.02 and
  7167.  earlier) and early versions of Microsoft language compilers.
  7168.  
  7169.  ────────────────────────────────────────────────────────────────────────────
  7170.  WARNING
  7171.  
  7172.  This option should be used only with assembly-language programs.
  7173.  ────────────────────────────────────────────────────────────────────────────
  7174.  
  7175.  
  7176.  5.4.18  /NOI (Employ Case Sensitivity)
  7177.  
  7178.  
  7179.  Option
  7180.  
  7181.    /NOI«GNORECASE»
  7182.  
  7183.  By default, QLINK treats uppercase letters and lowercase letters as
  7184.  equivalent. Thus ABC, abc, and Abc are considered the same name. When you
  7185.  use the /NOI option, the linker distinguishes between uppercase letters and
  7186.  lowercase letters and considers ABC, abc, and Abc to be three separate
  7187.  names. Because names in some high-level languages are not case sensitive,
  7188.  this option can have minimal importance. In Microsoft QuickC, however, case
  7189.  is significant. If you plan to link your files from other high-level
  7190.  languages with QuickC routines, you may need to use this option.
  7191.  
  7192.  
  7193.  5.4.19  /NOL (Suppress Sign-On Banner)
  7194.  
  7195.  
  7196.  Option
  7197.  
  7198.    /NOL«OGO»
  7199.  
  7200.  This option suppresses the QLINK sign-on banner display.
  7201.  
  7202.  
  7203.  5.4.20  /NON (Order Segments without Nulls)
  7204.  
  7205.  
  7206.  Option
  7207.  
  7208.    /NON«ULLSDOSSEG»
  7209.  
  7210.  This option arranges segments in the executable file in the same order they
  7211.  are arranged by the /DO«SSEG» option, but it doesn't insert 16 null bytes at
  7212.  the beginning of the _TEXT segment (if it is defined). The null bytes are
  7213.  normally inserted by the /DO option to provide proper alignment.
  7214.  
  7215.  The /NON option overrides the /DO option when both are used. Therefore, you
  7216.  can use /NON to override the /DO comment record commonly found in standard
  7217.  Microsoft libraries.
  7218.  
  7219.  
  7220.  5.4.21  /NOP (Disable Segment Packing)
  7221.  
  7222.  
  7223.  Option
  7224.  
  7225.    /NOP«ACKCODE»
  7226.  
  7227.  Normally you don't need to specify this option because QLINK doesn't
  7228.  ordinarily perform code-segment packing. However, if an environment variable
  7229.  such as LINK (or CL) turns on code-segment packing automatically, you can
  7230.  use /NOP to turn segment packing off again.
  7231.  
  7232.  
  7233.  5.4.22  /O (Set the Overlay Interrupt)
  7234.  
  7235.  
  7236.  Option
  7237.  
  7238.    /O«VERLAYINTERRUPT»:number
  7239.  
  7240.  By default, the interrupt number used for passing control to overlays is 63
  7241.  (3F hexadecimal). The /O option allows you to select a different interrupt
  7242.  number.
  7243.  
  7244.  The number can be a decimal number from 0 to 255, an octal number from octal
  7245.  0 to octal 0377, or a hexadecimal number from hexadecimal 0 to hexadecimal
  7246.  FF. Numbers that conflict with DOS interrupts can be used; however, their
  7247.  use is not advised.
  7248.  
  7249.  In general, you should not use /O with programs. The exception to this
  7250.  guideline would be a program that uses overlays and spawns another program
  7251.  that also uses overlays. In this case, each program should use a separate
  7252.  overlay-interrupt number, meaning that at least one of the programs should
  7253.  be compiled with /O.
  7254.  
  7255.  
  7256.  5.4.23  /PACKC (Pack Contiguous Segments)
  7257.  
  7258.  
  7259.  Option
  7260.  
  7261.    /PACKC«ODE»«:number»
  7262.  
  7263.  The /PACKC option affects code segments only in medium- and large-model
  7264.  programs. It should be used with the /F option. You don't need to understand
  7265.  the details of the /PACKC option in order to use it. You only need to know
  7266.  that this option, used in conjunction with /F, produces slightly faster and
  7267.  more compact code. The packing of code segments provides more opportunities
  7268.  for far-call optimization, which is enabled with /F. The /PACKC option is
  7269.  off by default; if on, it can be turned off with the /NOP option.
  7270.  
  7271.  The /PACKC option directs the linker to group neighboring code segments.
  7272.  Segments in the same group are assigned the same segment address; the offset
  7273.  addresses of items are adjusted upward accordingly. In other words, the
  7274.  /PACKC option does not change the physical address of any items.
  7275.  
  7276.  The number field specifies the maximum size of groups formed by /PACKC. The
  7277.  linker stops adding segments to a group as soon as it cannot add another
  7278.  segment without exceeding number. At that point, the linker starts forming a
  7279.  new group. The default for number is 65,530.
  7280.  
  7281.  You can safely use /PACKC with programs developed with the QuickC compiler.
  7282.  The /PACKC option, however, should not be used with assembly programs that
  7283.  make assumptions about the relative order of code segments. For example, the
  7284.  following assembly code attempts to calculate the distance between CSEG1 and
  7285.  CSEG2. This code would produce incorrect results when used with /PACKC
  7286.  because /PACKC causes the two segments to share the same segment address.
  7287.  Therefore, the procedure would always return 0.
  7288.  
  7289.    CSEG1    SEGMENT PARA PUBLIC 'CODE'
  7290.     .
  7291.     .
  7292.     .
  7293.     CSEG1    ENDS
  7294.  
  7295.     CSEG2    SEGMENT PARA PUBLIC 'CODE'
  7296.              ASSUME  cs:CSEG2
  7297.  
  7298.     ; Return the length of CSEG1 in AX.
  7299.  
  7300.     codsize  PROC   NEAR
  7301.              mov    ax,CSEG2    ; Load para address of CSEG1
  7302.              sub    ax,CSEG1    ; Load para address of CSEG2
  7303.              mov    cx,4        ; Load count, and convert
  7304.              shl    ax,cl       ;   distance from paragraphs
  7305.                                 ;   to bytes
  7306.     codsize  ENDP
  7307.  
  7308.     CSEG2    ENDS
  7309.  
  7310.  
  7311.  5.4.24  /PACKD (Pack Contiguous Data)
  7312.  
  7313.  
  7314.  Option
  7315.  
  7316.    /PACKD«ATA»«:number»
  7317.  
  7318.  The /PACKD option tells QLINK to group neighboring data segments. It works
  7319.  like the code packing option (/PACKC) except that it packs data segments.
  7320.  Use this option if your program uses a large number of very small data
  7321.  segments, since it combines them and reduces the system overhead required
  7322.  for using them. You should use this option if you use the compact or large
  7323.  memory models.
  7324.  
  7325.  The number field specifies the maximum size of a data segment grouped by
  7326.  /PACKD. If you omit number, QLINK uses the default value of 65,536. QLINK
  7327.  stops adding segments to a group as soon as it cannot add another segment
  7328.  without exceeding number. At this point, QLINK forms a new group.
  7329.  
  7330.  
  7331.  5.4.25  /PADC (Pad Code Segments)
  7332.  
  7333.  
  7334.  Option
  7335.  
  7336.    /PADC«ODE»:padsize
  7337.  
  7338.  The /PADC option adds filler bytes to the end of each code module, in
  7339.  preparation for subsequent incremental linking with ILINK. The padsize field
  7340.  specifies the number of filler bytes. You can specify padsize in decimal,
  7341.  octal, or hexadecimal format. This option and the related /PADD option are
  7342.  used in conjunction with incremental linking (see Section 5.4.10).
  7343.  
  7344.  These filler bytes provide space for expansion if ILINK updates the module
  7345.  later. If the updates involve increasing the amount of code, ILINK uses the
  7346.  space occupied by the filler bytes, instead of resizing the entire .EXE
  7347.  file. If the module outgrows the space available, an incremental violation
  7348.  occurs, and ILINK invokes QLINK to perform a full link. You can use code
  7349.  padding with small-, compact-, and mixed-model programs.
  7350.  
  7351.  If you don't specify the /PADC option, QLINK doesn't add any bytes to the
  7352.  code segment. The optimum amount of padding to specify depends on how much
  7353.  your code changes from one link to the next. If you expect to add only a
  7354.  little code, choose a relatively small amount of padding (32 to 64 bytes).
  7355.  If ILINK issues the message
  7356.  
  7357.    padding exceeded
  7358.  
  7359.  and performs a full link more often than desired, increase the padding size.
  7360.  Remember that the total size of a code segment, including padding bytes,
  7361.  cannot exceed 64K.
  7362.  
  7363.  
  7364.  5.4.26  /PADD (Pad Data Segments)
  7365.  
  7366.  
  7367.  Option
  7368.  
  7369.    /PADD«ATA»:padsize
  7370.  
  7371.  The /PADD option adds filler bytes to the end of each code module, in
  7372.  preparation for incremental linking with ILINK later. The padsize field
  7373.  specifies the number of filler bytes. You can specify padsize in decimal,
  7374.  octal, or hexadecimal format. This option and the related /PADC option are
  7375.  used in conjunction with incremental linking (see Section 5.4.10).
  7376.  
  7377.  These filler bytes provide space for expansion if ILINK updates the module
  7378.  later. If the updates involve increasing the amount of data, ILINK uses the
  7379.  space occupied by the filler bytes, instead of resizing the entire .EXE
  7380.  file. If the module outgrows the space available, an incremental violation
  7381.  occurs and ILINK invokes QLINK to perform a full link.
  7382.  
  7383.  QLINK normally adds 16 filler bytes. This amount of padding should be
  7384.  sufficient in most cases, since public variables are added less frequently
  7385.  than code. If ILINK issues the message
  7386.  
  7387.    padding exceeded
  7388.  
  7389.  and performs a full link more often than desired, increase the padding size.
  7390.  Remember that the total size of a data segment, including padding bytes,
  7391.  cannot exceed 64K.
  7392.  
  7393.  
  7394.  5.4.27  /PAU (Pause during Linking)
  7395.  
  7396.  
  7397.  Option
  7398.  
  7399.    /PAU«SE»
  7400.  
  7401.  The /PAU option tells QLINK to pause before it writes the executable (.EXE)
  7402.  file to disk. Use this option if you want to create the executable file on
  7403.  its own removable (floppy) disk. Without the /PAU option, QLINK performs the
  7404.  linking session from beginning to end without stopping.
  7405.  
  7406.  If you specify the /PAU option, QLINK displays the following message before
  7407.  it creates the file:
  7408.  
  7409.    About to generate .EXE file
  7410.    Change diskette in drive letter and press <ENTER>
  7411.  
  7412.  The letter corresponds to the current drive. QLINK resumes processing when
  7413.  you press ENTER.
  7414.  
  7415.  ────────────────────────────────────────────────────────────────────────────
  7416.  NOTE
  7417.  
  7418.  Do not remove the disk that will receive the listing file or the disk used
  7419.  for the temporary file.
  7420.  ────────────────────────────────────────────────────────────────────────────
  7421.  
  7422.  Depending on how much memory is available, QLINK may create a temporary disk
  7423.  file during processing (see Section 5.3, "QLINK Memory Requirements") and
  7424.  display the following message:
  7425.  
  7426.    Temporary file tempfile has been created.
  7427.    Do not change diskette in drive, letter
  7428.  
  7429.  If QLINK creates the file on the disk you plan to swap, press CTRL+C to
  7430.  terminate the QLINK session. Rearrange your files so that the temporary file
  7431.  and the executable file can be written to the same disk, then try linking
  7432.  again.
  7433.  
  7434.  
  7435.  5.4.28  /SE (Set Maximum Number of Segments)
  7436.  
  7437.  
  7438.  Option
  7439.  
  7440.    /SE«GMENTS»:number
  7441.  
  7442.  The /SE option controls the number of segments that the linker allows a
  7443.  program to have. The default is 128, but you can set number to any value
  7444.  (decimal, octal, or hexadecimal) in the range 1-3,072 (decimal).
  7445.  
  7446.  For each segment, the linker must allocate some space to keep track of
  7447.  segment information. By using a relatively low segment limit as a default
  7448.  (128), the linker is able to link faster and allocate less storage space.
  7449.  
  7450.  When you set the segment limit higher than 128, the linker allocates
  7451.  additional space for segment information. This option allows you to raise
  7452.  the segment limit for programs with a large number of segments. For programs
  7453.  with fewer than 128 segments, you can keep the storage requirements of the
  7454.  linker at the lowest level possible by setting number to reflect the actual
  7455.  number of segments in the program. If the number of segments allocated is
  7456.  too high for the amount of memory available to the linker, QLINK issues the
  7457.  following error message:
  7458.  
  7459.    segment limit set too high
  7460.  
  7461.  If this occurs, relink the object files, specifying a lower segment limit.
  7462.  
  7463.  
  7464.  5.4.29  /ST (Set Stack Size)
  7465.  
  7466.  
  7467.  Option
  7468.  
  7469.    /ST«ACK»:number
  7470.  
  7471.  The /ST option allows you to specify the size of the stack for your program.
  7472.  The number is any positive value (decimal, octal, or hexadecimal) up to
  7473.  65,535 (decimal). It represents the size, in bytes, of the stack. If you do
  7474.  not use this option, the stack size is 2K.
  7475.  
  7476.  If your program returns a stack-overflow message, you may need to increase
  7477.  the size of the stack. In contrast, if your program uses the stack very
  7478.  little, you can save some space by decreasing the stack size.
  7479.  
  7480.  
  7481.  5.4.30  /T (Create a .COM File)
  7482.  
  7483.  
  7484.  Option
  7485.  
  7486.    /T«INY»
  7487.  
  7488.  The /T option causes QLINK to create a .COM file instead of a .EXE file. It
  7489.  can be used for programs that use the tiny memory model. The result is the
  7490.  same as if you had linked a .EXE file from a tiny-model program, and then
  7491.  used the EXE2BIN program to convert it to a .COM file. (See The MS-DOS
  7492.  Programmer's Reference Manual for more information on .COM files and the
  7493.  EXE2BIN program.)
  7494.  
  7495.  When you use the /T option, the linker normally produces an output file with
  7496.  the .COM extension. If you specify a file name with a different extension,
  7497.  the linker applies the extension you specify. Note that the "Run File"
  7498.  prompt shows the .EXE extension if you have not yet given the /T option.
  7499.  After you give the option, the linker issues a warning message that the
  7500.  extension of the output file is .COM.
  7501.  
  7502.  Not every program can be linked using .COM format. When you specify the /T
  7503.  option, QLINK automatically sets the /F option to optimize far calls; this
  7504.  provides the best chance that a .COM format file can be generated.
  7505.  
  7506.  The following restrictions apply to programs written for the .COM format:
  7507.  
  7508.  
  7509.    ■   The program must consist of only one physical segment. If you have
  7510.        written an assembly-language program, you can declare more than one
  7511.        segment. However, the segments must be in the same group.
  7512.  
  7513.    ■   The program cannot perform load-time relocations, and therefore cannot
  7514.        have any far-segment references. Specifically, segment addresses
  7515.        cannot be used as immediate data for instructions. You cannot, for
  7516.        example, use the instruction
  7517.  
  7518.                mov    ax, CODESEG
  7519.  
  7520.  
  7521.        The linker issues an error if it detects such references.
  7522.  
  7523.  
  7524.  When you give the /CO option in combination with /T, QLINK creates a
  7525.  separate file with debugger information rather than embedding debugger
  7526.  information in the .COM file. QLINK gives this file the base name of the
  7527.  .COM file plus the .DBG extension, and places it in the current directory.
  7528.  
  7529.  The /T option is incompatible with the /INC option.
  7530.  
  7531.  ────────────────────────────────────────────────────────────────────────────
  7532.  NOTE
  7533.  
  7534.  This option was called the /BI«NARY» option in previous versions of the
  7535.  linker included with QuickC.
  7536.  ────────────────────────────────────────────────────────────────────────────
  7537.  
  7538.  
  7539.  5.5  Linker Operation
  7540.  
  7541.  QLINK performs the following steps to combine object files and produce an
  7542.  executable file:
  7543.  
  7544.  
  7545.    1.  Reads the object files submitted
  7546.  
  7547.    2.  Searches the given libraries, if necessary, to resolve external
  7548.        references
  7549.  
  7550.    3.  Assigns addresses to segments
  7551.  
  7552.    4.  Assigns addresses to public symbols
  7553.  
  7554.    5.  Reads code and data in the segments
  7555.  
  7556.    6.  Reads all relocation references in object files
  7557.  
  7558.    7.  Performs fixups
  7559.  
  7560.    8.  Outputs an executable file (executable image and relocation
  7561.        information)
  7562.  
  7563.  
  7564.  Steps 5, 6, and 7 are performed concurrently: in other words, QLINK moves
  7565.  back and forth between these steps before it progresses to step 8.
  7566.  
  7567.  The "executable image" contains the code and data that constitute the
  7568.  executable file. The "relocation information" is a list of references,
  7569.  relative to the start of the program. The references change when the
  7570.  executable image is loaded into memory and an actual address for the entry
  7571.  point is assigned.
  7572.  
  7573.  The following sections explain the process QLINK uses to concatenate
  7574.  segments and resolve references to items in memory.
  7575.  
  7576.  
  7577.  5.5.1  Alignment of Segments
  7578.  
  7579.  QLINK uses a segment's alignment type to set the starting address for the
  7580.  segment. The alignment types are BYTE, WORD, PARA, and PAGE. These
  7581.  correspond to starting addresses at byte, word, paragraph, and page
  7582.  boundaries, representing addresses that are multiples of 1, 2, 16, and 256,
  7583.  respectively. The default alignment is PARA.
  7584.  
  7585.  When QLINK encounters a segment, it checks the alignment type before copying
  7586.  the segment to the executable file. If the alignment is WORD, PARA, or PAGE,
  7587.  QLINK checks the executable image to see if the last byte copied ends on the
  7588.  appropriate boundary. If not, QLINK pads the image with null bytes.
  7589.  
  7590.  
  7591.  5.5.2  Frame Number
  7592.  
  7593.  QLINK computes a starting address for each segment in the program. The
  7594.  starting address is based on the segment's alignment and the sizes of the
  7595.  segments already copied to the executable file (as described in the previous
  7596.  section). The starting address consists of an offset and a "canonical frame
  7597.  number." The canonical frame number specifies the address of the first
  7598.  paragraph in memory that contains one or more bytes of the segment. (A
  7599.  paragraph is 16 bytes of memory; therefore, to compute a physical location
  7600.  in memory, multiply the frame number by 16 and add the offset.) The offset
  7601.  is the number of bytes from the start of the paragraph to the first byte in
  7602.  the segment. For BYTE and WORD alignments, the offset may be nonzero. The
  7603.  offset is always zero for PARA and PAGE alignments. (An offset of zero means
  7604.  that the physical location is an exact multiple of 16.)
  7605.  
  7606.  You can find the frame number for each segment in the map file created by
  7607.  QLINK. The first four digits of the segment's start address give the frame
  7608.  number in hexadecimal. For example, a start address of 0C0A6 indicates the
  7609.  frame number 0C0A.
  7610.  
  7611.  
  7612.  5.5.3  Order of Segments
  7613.  
  7614.  QLINK copies segments to the executable file in the same order that it
  7615.  encounters them in the object files. This order is maintained throughout the
  7616.  program unless QLINK encounters two or more segments that have the same
  7617.  class name. Segments having identical segment names are copied as a
  7618.  contiguous block to the executable file.
  7619.  
  7620.  The /DO option may change the way in which segments are ordered (see Section
  7621.  5.4.4).
  7622.  
  7623.  
  7624.  5.5.4  Combined Segments
  7625.  
  7626.  QLINK uses combine types to determine whether two or more segments that
  7627.  share the same segment name should be combined into one large segment. The
  7628.  valid combine types are PUBLIC, STACK, COMMON, and PRIVATE.
  7629.  
  7630.  If a segment has combine type PUBLIC, QLINK automatically combines it with
  7631.  any other segments that have the same name and belong to the same class.
  7632.  When QLINK combines segments, it ensures that the segments are contiguous
  7633.  and that all addresses in the segments can be accessed using an offset from
  7634.  the same frame address. The result is the same as if the segment were
  7635.  defined as a whole in the source file.
  7636.  
  7637.  QLINK preserves each individual segment's alignment type. This means that
  7638.  even though the segments belong to a single large segment, the code and data
  7639.  in the segments do not lose their original alignment. If the combined
  7640.  segments exceed 64K, QLINK displays an error message.
  7641.  
  7642.  If a segment has combine type STACK, QLINK carries out the same combine
  7643.  operation as for PUBLIC segments. The only exception is that STACK segments
  7644.  cause QLINK to copy an initial stack-pointer value to the executable file.
  7645.  This stack-pointer value is the offset to the end of the first stack segment
  7646.  (or combined stack segment) encountered.
  7647.  
  7648.  If a segment has combine type COMMON, QLINK automatically combines it with
  7649.  any other segments that have the same name and belong to the same class.
  7650.  When QLINK combines COMMON segments, however, it places the start of each
  7651.  segment at the same address, creating a series of overlapping segments. The
  7652.  result is a single segment no larger than the largest segment combined.
  7653.  
  7654.  A segment has combine type PRIVATE only if no explicit combine type is
  7655.  defined for it in the source file. QLINK does not combine private segments.
  7656.  
  7657.  
  7658.  
  7659.  5.5.5  Groups
  7660.  
  7661.  Groups allow segments to be addressed relative to the same frame address.
  7662.  When QLINK encounters a group, it adjusts all memory references to items in
  7663.  the group so that they are relative to the same frame address.
  7664.  
  7665.  Segments in a group do not have to be contiguous, belong to the same class,
  7666.  or have the same combine type. The only requirement is that all segments in
  7667.  the group fit within 64K.
  7668.  
  7669.  Groups do not affect the order in which the segments are loaded. Unless you
  7670.  use class names and enter object files in the right order, there is no
  7671.  guarantee that the segments will be contiguous. In fact, QLINK may place
  7672.  segments that do not belong to the group in the same 64K of memory. QLINK
  7673.  does not explicitly check whether all the segments in a group fit within 64K
  7674.  of memory; however, QLINK is likely to encounter a fixup-overflow error if
  7675.  they do not.
  7676.  
  7677.  
  7678.  5.5.6  Fixups
  7679.  
  7680.  Once the linker knows the starting address of each segment in the program
  7681.  and has established all segment combinations and groups, QLINK can "fix up"
  7682.  any unresolved references to labels and variables. To fix up unresolved
  7683.  references, QLINK computes the appropriate offset and segment address and
  7684.  replaces the temporary values generated by the assembler with the new
  7685.  values.
  7686.  
  7687.  QLINK carries out fixups for the types of references shown in Table 5.1.
  7688.  
  7689.  The size of the value to be computed depends on the type of reference. If
  7690.  QLINK discovers an error in the anticipated size of a reference, it displays
  7691.  a fixupoverflow message. This can happen, for example, if a program attempts
  7692.  to use a 16-bit offset to reach an instruction that is more than 64K away.
  7693.  It can also occur if all segments in a group do not fit within a single 64K
  7694.  block of memory.
  7695.  
  7696.  
  7697.  5.6  Using Overlays
  7698.  
  7699.  You can direct QLINK to create an overlaid version of a program. In an
  7700.  overlaid version of a program, specified parts of the program (overlays) are
  7701.  loaded only if and when they are needed. These parts share the same space in
  7702.  memory. Only code is overlaid; data are never overlaid. Programs that use
  7703.  overlays usually require less memory, but they run more slowly because of
  7704.  the time needed to read and reread the code from disk into memory.
  7705.  
  7706.  Table 5.1  QLINK Fixups
  7707.  
  7708. ╓┌──────────────────────┌─────────────────────────┌──────────────────────────╖
  7709.  Type                   Location of Reference     QLINK Action
  7710.  ────────────────────────────────────────────────────────────────────────────
  7711.  Short                  In JMP instructions that  Computes a signed,
  7712.                         attempt to pass control   eight-bit number for the
  7713.                         to labeled instructions   reference, and displays
  7714.                         in the same segment or    an error message if the
  7715.                         group. The target         target instruction
  7716.                         instruction must be no    belongs to a different
  7717.                         more than 128 bytes from  segment or group (has a
  7718.                         the point of reference.   different frame address),
  7719.                                                   or if the target is more
  7720.                                                   than 128 bytes away in
  7721.                                                   either
  7722.                                                   direction.
  7723.  
  7724.  Near self-relative     In instructions that      Computes a 16-bit offset
  7725.                         access data relative to   for the reference and
  7726.                         the same segment or       displays an error if the
  7727.                         group.                    data are not in the same
  7728.                                                   segment or group.
  7729.  
  7730.  Type                   Location of Reference     QLINK Action
  7731.  ────────────────────────────────────────────────────────────────────────────
  7732. 
  7733.  Near segment-relative  In instructions that      Computes a 16-bit offset
  7734.                         attempt to access data    for the reference, and
  7735.                         in a specified segment    displays an error message
  7736.                         or group, or relative to  if the offset of the
  7737.                         a specified segment       target within the
  7738.                         register.                 specified frame is
  7739.                                                   greater than 64K or less
  7740.                                                   than 0, or if the begin-
  7741.                                                   ning of the canonical
  7742.                                                   frame of the target is
  7743.                                                   not addressable.
  7744.  
  7745.  Long                   In CALL instructions      Computes a 16-bit frame
  7746.                         that attempt to access    address and 16-bit offset
  7747.                         an instruction in         for this reference, and
  7748.                         another segment or group.  displays an error message
  7749.                                                   if the computed offset is
  7750.                                                   greater than 64K or less
  7751.  Type                   Location of Reference     QLINK Action
  7752.  ────────────────────────────────────────────────────────────────────────────
  7753.                                                  greater than 64K or less
  7754.                                                   than 0, or if the begin-
  7755.                                                   ning of the canonical
  7756.                                                   frame of the target is
  7757.                                                   not addressable.
  7758.  
  7759.  ────────────────────────────────────────────────────────────────────────────
  7760.  
  7761.  
  7762.  
  7763.  You specify overlays by enclosing them in parentheses in the list of object
  7764.  files that you submit to the linker. Each module in parentheses represents
  7765.  one overlay. For example, you could give the following object-file list in
  7766.  the objfiles field of the QLINK command line:
  7767.  
  7768.    a + (b+c) + (e+f) + g + (i)
  7769.  
  7770.  In this example, the modules  (b+c),  (e+f), and  (i)  are overlays. The
  7771.  remaining modules, and any drawn from the run-time libraries, constitute the
  7772.  resident part (or root) of your program. Overlays are loaded into the same
  7773.  region of memory, so only one can be resident at a time. Duplicate names in
  7774.  different overlays are not supported, so each module can appear only once in
  7775.  a program.
  7776.  
  7777.  The linker replaces calls from the root to an overlay and from an overlay to
  7778.  another overlay with an interrupt (followed by the module identifier and
  7779.  offset). By default, the interrupt number is 63 (3F hexadecimal). You can
  7780.  use the /O option of the QLINK command to change the interrupt number.
  7781.  
  7782.  You can use the CodeView debugger with overlaid modules. In fact, in the
  7783.  case of large programs, you may need to use overlays to leave sufficient
  7784.  room for the debugger to operate. However, the QuickC debugger cannot debug
  7785.  overlaid modules.
  7786.  
  7787.  
  7788.  5.6.1  Restrictions on Overlays
  7789.  
  7790.  You can overlay only modules to which control is transferred and returned by
  7791.  a standard 8086 long (32-bit) call/return instruction. Therefore, because
  7792.  calls to subroutines modified with the near attribute are short (16-bit)
  7793.  calls, you cannot overlay modules containing near subroutines if other
  7794.  modules call those subroutines. You cannot use long jumps with the longjmp
  7795.  library function. Also, the linker does not produce overlay modules that can
  7796.  be called indirectly through function pointers. When a function is called
  7797.  through a pointer, the called function must be in the same overlay or root.
  7798.  
  7799.  
  7800.  
  7801.  5.6.2  Overlay-Manager Prompts
  7802.  
  7803.  The overlay manager is part of the language's run-time library. If you
  7804.  specify overlays during linking, the code for the overlay manager is
  7805.  automatically linked with the other modules of your program. Even with
  7806.  overlays, the linker produces only one .EXE file. At run time, the overlay
  7807.  manager opens the .EXE file each time it needs to extract new overlay
  7808.  modules. The overlay manager first searches for the file in the current
  7809.  directory; then, if it does not find the file, the manager searches the
  7810.  directories listed in the PATH environment variable. When it finds the file,
  7811.  the overlay manager extracts the overlay modules specified by the root
  7812.  program. If the overlay manager cannot find an overlay file when needed, it
  7813.  prompts you for the file name.
  7814.  
  7815.  For example, assume that an executable program called PAYROLL.EXE uses
  7816.  overlays and does not exist in either the current directory or the
  7817.  directories specified by PATH. If you run PAYROLL.EXE (by entering a
  7818.  complete path specification), the overlay manager displays the following
  7819.  message when it attempts to load overlay files:
  7820.  
  7821.    Cannot find PAYROLL.EXE
  7822.    Please enter new program spec:
  7823.  
  7824.  You can then enter the drive or directory, or both, where PAYROLL.EXE is
  7825.  located. For example, if the file is located in directory \EMPLOYEE\DATA\
  7826.  on drive B, you could enter B:\EMPLOYEE\DATA\ or you could enter
  7827.  \EMPLOYEE\DATA\ if the current drive is B.
  7828.  
  7829.  If you later remove the disk in drive B and the overlay manager needs to
  7830.  access the overlay again, it does not find PAYROLL.EXE and displays the
  7831.  following message:
  7832.  
  7833.    Please insert diskette containing B:\EMPLOYEE\DATA\PAYROLL.EXE
  7834.    in drive B: and strike any key when ready.
  7835.  
  7836.  After reading the overlay file from the disk, the overlay manager displays
  7837.  the following message:
  7838.  
  7839.    Please restore the original diskette.
  7840.    Strike any key when ready.
  7841.  
  7842.  Execution of the program then continues.
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  Chapter 6  LIB
  7850.  ────────────────────────────────────────────────────────────────────────────
  7851.  
  7852.  The Microsoft Library Manager (LIB) helps you create and maintain objectcode
  7853.  libraries. An object-code library is a collection of separately compiled or
  7854.  assembled object files combined into a single file. Object-code libraries
  7855.  provide a convenient source of commonly used routines. A program that calls
  7856.  library routines is linked with the library to produce the executable file.
  7857.  Only the necessary routines, not all library routines, are linked into the
  7858.  executable file.
  7859.  
  7860.  Library files are usually identified by their .LIB extension, although other
  7861.  extensions are allowed. In addition to accepting DOS object files and
  7862.  library files, LIB can read the contents of 286 XENIX(R) archives and
  7863.  Intel-style libraries and combine their contents with DOS libraries.
  7864.  
  7865.  You can use the LIB utility to
  7866.  
  7867.  
  7868.    ■   Create a new library file
  7869.  
  7870.    ■   Add object files or the contents of a library to an existing library
  7871.  
  7872.    ■   Delete library modules
  7873.  
  7874.    ■   Replace library modules
  7875.  
  7876.    ■   Copy library modules to object files
  7877.  
  7878.  
  7879.  
  7880.  6.1  Invoking LIB
  7881.  
  7882.  To invoke LIB, type the LIB command on the DOS command line. You can specify
  7883.  the input required in one of three ways:
  7884.  
  7885.  
  7886.    1.  Type it on the command line.
  7887.  
  7888.    2.  Respond to prompts.
  7889.  
  7890.    3.  Specify a response file (a file containing responses to prompts).
  7891.  
  7892.  
  7893.  The three sections below present the three methods of invoking LIB. Section
  7894.  6.1.1 describes the input fields in detail and is relevant to all three
  7895.  methods.
  7896.  
  7897.  To terminate the library session at any time and return to DOS, press
  7898.  CTRL+C.
  7899.  
  7900.  
  7901.  6.1.1  Command Line
  7902.  
  7903.  You can start LIB and specify all the necessary input from the command line.
  7904.  In this case, the LIB command line has the following form:
  7905.  
  7906.    LIB oldlibrary «options» «commands» «,«listfile» «,« newlibrary» » » «;»
  7907.  
  7908.  The individual components of the command line are discussed in the sections
  7909.  that follow.
  7910.  
  7911.  Type a semicolon (;) anywhere a comma appears to tell LIB to use the default
  7912.  responses for the remaining fields. The semicolon should be the last
  7913.  character on the command line.
  7914.  
  7915.  Typing a semicolon after the oldlibrary field causes LIB to perform a
  7916.  consistency check on the library─no other action is performed. LIB displays
  7917.  any consistency errors it finds and returns to the operating-system level.
  7918.  
  7919.  
  7920.  Examples
  7921.  
  7922.    LIB GRAPHIC;
  7923.  
  7924.  The example above causes LIB to perform a consistency check on the library
  7925.  file GRAPHIC.LIB.
  7926.  
  7927.    LIB GRAPHIC ,SYMBOLS.LST;
  7928.  
  7929.  This example tells LIB to perform a consistency check on the library file
  7930.  GRAPHIC.LIB and to create SYMBOLS.LST, a cross-reference-listing file.
  7931.  
  7932.    LIB GRAPHIC +STAR;
  7933.  
  7934.  The example above uses the add-command symbol (+) to instruct LIB to add the
  7935.  file STAR to the library GRAPHIC.LIB. The semicolon at the end of the
  7936.  command line causes LIB to use the default responses for the remaining
  7937.  fields. As a result, no listing file is created and the original library
  7938.  file is renamed GRAPHIC.BAK. The modified library is GRAPHIC.LIB.
  7939.  
  7940.    LIB GRAPHIC -*JUNK *STAR, ,SHOW
  7941.  
  7942.  This last example instructs LIB to move the module JUNK from the library
  7943.  GRAPHIC.LIB to an object file called JUNK.OBJ. The module JUNK is removed
  7944.  from the library in the process. The module STAR is copied from the library
  7945.  to an object file called STAR.OBJ; the module remains in the library. No
  7946.  cross-reference-listing file is produced. The revised library is called
  7947.  SHOW.LIB. It contains all the modules in GRAPHIC.LIB except JUNK, which was
  7948.  removed by using the move-command symbol (-*). The original library,
  7949.  GRAPHIC.LIB, remains unchanged.
  7950.  
  7951.  
  7952.  6.1.1.1  Library File
  7953.  
  7954.  Use the oldlibrary field to specify the name of the library to be modified.
  7955.  The LIB utility assumes that the file-name extension is .LIB, since this is
  7956.  usually the case. If your library file has the .LIB extension, you can omit
  7957.  it. Otherwise, include the extension. You must give LIB the path name of a
  7958.  library file if it is in another directory or on another disk.
  7959.  
  7960.  There is no default for the oldlibrary field. This field is required and LIB
  7961.  issues an error message if you do not give a file name.
  7962.  
  7963.   Consistency check
  7964.  
  7965.  If you type a library name and follow it immediately with a semicolon (;),
  7966.  LIB performs only a consistency check on the given library. A consistency
  7967.  check tells you whether all the modules in the library are in usable form.
  7968.  No changes are made to the library. It is usually not necessary to perform
  7969.  consistency checks because LIB automatically checks object files for
  7970.  consistency before adding them to the library. The LIB utility prints a
  7971.  message if it finds an invalid object module; no message appears if all
  7972.  modules are intact.
  7973.  
  7974.  
  7975.  6.1.1.2  LIB Options
  7976.  
  7977.  LIB has five options. Specify options on the command line following the
  7978.  required library-file name and preceding any commands.
  7979.  
  7980.  
  7981.  Option
  7982.  
  7983.    /I«GNORECASE»
  7984.  
  7985.  The /I option tells LIB to ignore case when comparing symbols, which is the
  7986.  default. Use this option when you are combining a library that is case
  7987.  sensitive (created with the /NOI option) with others that are not case
  7988.  sensitive. The resulting library will not be case sensitive. The /NOI option
  7989.  is described later in this section.
  7990.  
  7991.  
  7992.  Option
  7993.  
  7994.    /NOE«XTDICTIONARY»
  7995.  
  7996.  The /NOE option tells LIB not to generate an extended dictionary. The
  7997.  extended dictionary is an extra part of the library that helps the linker
  7998.  process libraries faster.
  7999.  
  8000.  Use the /NOE option if you get either the error message  insufficient memory
  8001.   or  no more virtual memory, or if the extended dictionary causes problems
  8002.  with the linker. See Section 5.4.15 for more information on how the linker
  8003.  uses the extended dictionary.
  8004.  
  8005.  
  8006.  Option
  8007.  
  8008.    /NOI«GNORECASE»
  8009.  
  8010.  The /NOI option tells LIB not to ignore case when comparing symbols; that
  8011.  is, /NOI makes LIB case sensitive. By default, LIB ignores case. Using this
  8012.  option allows symbols that are the same except for case, such as Spline and
  8013.  SPLINE, to be put in the same library.
  8014.  
  8015.  Note that when you create a library with the /NOI option, LIB "marks" the
  8016.  library internally to indicate that /NOI is in effect. Earlier versions of
  8017.  LIB did not mark libraries in this way. If you combine multiple libraries
  8018.  and any one of them is marked /NOI, then /NOI is assumed to be in effect for
  8019.  the output library.
  8020.  
  8021.  
  8022.  Option
  8023.  
  8024.    /NOL«OGO»
  8025.  
  8026.  The /NOL option suppresses the display of the sign-on banner when LIB is
  8027.  first invoked. This option can be used for batch file operation.
  8028.  
  8029.  
  8030.  Option
  8031.  
  8032.    /PA«GESIZE»:number
  8033.  
  8034.  The /PA option specifies the library-page size of a new library or changes
  8035.  the library-page size of an existing library. The number specifies the new
  8036.  page size. It must be an integer value representing a power of 2 between the
  8037.  values 16 and 32,768.
  8038.  
  8039.  A library's page size affects the alignment of modules stored in the
  8040.  library. Modules in the library are always aligned to start at a position
  8041.  that is a multiple of the page size (in bytes) from the beginning of the
  8042.  file. The default page size for a new library is 16 bytes; for an existing
  8043.  library, the default is its current page size. Because of the indexing
  8044.  technique used by the LIB utility, a library with a large page size can hold
  8045.  more modules than a library with a smaller page size. For each module in the
  8046.  library, however, an average of number/2 bytes of storage space is wasted.
  8047.  In most cases, a small page size is advantageous; you should use a small
  8048.  page size unless you need to put a very large number of modules in a
  8049.  library.
  8050.  
  8051.  Another consequence of the indexing technique is that the page size
  8052.  determines the maximum possible size of the library file. Specifically, this
  8053.  limit is number * 65,536. For example, /PA:16 means that the library file
  8054.  must be smaller than 1 megabyte (16 * 65,536 bytes).
  8055.  
  8056.  
  8057.  6.1.1.3  Commands
  8058.  
  8059.  The commands field allows you to specify the command symbols for
  8060.  manipulating modules. In this field, type a command symbol followed
  8061.  immediately by a module name or an object-file name. The command symbols are
  8062.  the following:
  8063.  
  8064.  Symbol                            Action
  8065.  ────────────────────────────────────────────────────────────────────────────
  8066.  +                                 Adds an object file or library to the
  8067.                                    library
  8068.  
  8069.  -                                 Deletes a module from the library
  8070.  
  8071.  - +                               Replaces a module in the library
  8072.  
  8073.  *                                 Copies a module from the library to an
  8074.                                    object file
  8075.  
  8076.  - *                               Moves a module (copies the module and
  8077.                                    then
  8078.                                    deletes it)
  8079.  
  8080.  Note that LIB does not process commands in left-to-right order; it uses its
  8081.  own precedence rules for processing, as described in Section 6.2. You can
  8082.  specify more than one operation in the commands field, in any order. LIB
  8083.  makes no changes to oldlibrary if you leave this field blank.
  8084.  
  8085.  
  8086.  6.1.1.4  Cross-Reference Listing File
  8087.  
  8088.  The listfile field allows you to specify a file name for a cross-reference
  8089.  listing file. You can give the listing file any name and any extension. To
  8090.  create it outside your current directory, supply a path specification. Note
  8091.  that the LIB utility does not assume any defaults for this field on the
  8092.  command line. If you do not specify a name for the file, the file is not
  8093.  created.
  8094.  
  8095.  A cross-reference listing file contains the following two lists:
  8096.  
  8097.  
  8098.    1.  An alphabetical list of all public symbols in the library.
  8099.  
  8100.        Each symbol name is followed by the name of the module in which it is
  8101.        defined. The example output below shows that the public symbol  ADD
  8102.        is contained in the module  junk  and the public symbols  CALC,  MAKE,
  8103.        and  ROLL  are contained in the module  dice:
  8104.  
  8105.        ADD...............junk              CALC..............dice
  8106.        MAKE..............dice              ROLL..............dice
  8107.  
  8108.    2.  A list of the modules in the library.
  8109.  
  8110.        Under each module name is an alphabetical listing of the public
  8111.        symbols defined in that module. The example output below shows that
  8112.        the module  dice  contains the public symbols  CALC,  MAKE, and  ROLL
  8113.        and the module  junk  contains the public symbol  ADD:
  8114.  
  8115.  
  8116.    dice             Offset: 00000010H  Code and data size: 621H
  8117.      CALC              MAKE              ROLL
  8118.  
  8119.    junk             Offset: 00000bc0H  Code and data size: 118H
  8120.      ADD
  8121.  
  8122.  
  8123.  6.1.1.5  Output Library
  8124.  
  8125.  If you specify a name in the newlibrary field, LIB gives this name to the
  8126.  modified library it creates. You need not give a name unless you specify
  8127.  commands to change the library.
  8128.  
  8129.  If you leave this field blank, the original library is renamed with a .BAK
  8130.  extension, and the modified library receives the original name.
  8131.  
  8132.  
  8133.  6.1.2  Prompts
  8134.  
  8135.  If you want to respond to individual prompts to give input to LIB, start the
  8136.  LIB utility at the DOS command level by typing LIB. The library manager
  8137.  prompts you for the input it needs by displaying the following four
  8138.  messages, one at a time:
  8139.  
  8140.    Library name:
  8141.    Operations:
  8142.    List file:
  8143.    Output library:
  8144.  
  8145.  LIB waits for you to respond to each prompt before printing the next prompt.
  8146.  If you notice that you have entered an incorrect response to a previous
  8147.  prompt, press CTRL+C to exit LIB and begin again.
  8148.  
  8149.  The responses to the LIB command prompts correspond to fields on the LIB
  8150.  command line (Section 6.1.1), as follows:
  8151.  
  8152.  Prompt                            Corresponding Command-Line Field
  8153.  ────────────────────────────────────────────────────────────────────────────
  8154.  "Library name"                    The oldlibrary field and the options. To
  8155.                                    perform a consistency check on the
  8156.                                    library, type a semicolon (;)
  8157.                                    immediately after the library name.
  8158.  
  8159.                                    If the library you name does not exist,,
  8160.                                    LIB displays the following prompt:
  8161.  
  8162.                                    Library does not exist. Create? (y/n)
  8163.  
  8164.                                    Type  y  to create the library file, or
  8165.                                    n  to terminate the session. This
  8166.                                    message does not appear if a command, a
  8167.                                    comma, or a semicolon immediately
  8168.                                    follows the library name.
  8169.  
  8170.  "Operations"                      The commands field.
  8171.  
  8172.  "List file"                       The listfile field.
  8173.  
  8174.  "Output library"                  The newlibrary field. This prompt
  8175.                                    appears only if you specify at least one
  8176.                                    operation at the "Operations" prompt.
  8177.  
  8178.   Extending lines
  8179.  
  8180.  If you have many operations to perform during a library session, use the
  8181.  ampersand symbol (&) to extend the operations line. Type the symbol after
  8182.  the name of an object module or object file; do not put the ampersand
  8183.  between a command symbol and a name.
  8184.  
  8185.  The ampersand causes LIB to display the "Operations" prompt again, allowing
  8186.  you to specify more operations.
  8187.  
  8188.   Default responses
  8189.  
  8190.  Press ENTER to choose the default response for the current prompt. Type a
  8191.  semicolon (;) and press ENTER after any response except "Library name" to
  8192.  select default responses for all remaining prompts.
  8193.  
  8194.  The following list shows the defaults for LIB prompts:
  8195.  
  8196.  Prompt                            Default
  8197.  ────────────────────────────────────────────────────────────────────────────
  8198.  "Operations"                      No operation; no change to library file
  8199.  
  8200.  "List file"                       NULL; tells LIB not to create a listing
  8201.                                    file
  8202.  
  8203.  "Output library"                  Current library name
  8204.  
  8205.  
  8206.  6.1.3  Response File
  8207.  
  8208.  Using a response file lets you conduct the library session without typing
  8209.  responses to prompts at the keyboard. To run LIB with a response file, you
  8210.  must first create the response file. Then type the following at the DOS
  8211.  command line:
  8212.  
  8213.    LIB @responsefile
  8214.  
  8215.  The responsefile is the name of a response file. Specify a path name if the
  8216.  response file is not in the current directory.
  8217.  
  8218.  You can also type @responsefile at any position on a command line or after
  8219.  any of the prompts. The input from the response file is treated exactly as
  8220.  if it had been entered on a command line or after the prompts. A new-line
  8221.  character in the response file is treated the same as pressing the ENTER key
  8222.  in response to a prompt.
  8223.  
  8224.  A response file uses one text line for each prompt. Responses must appear in
  8225.  the same order as the command prompts appear. Use command symbols in the
  8226.  response file the same way you would use responses typed on the keyboard.
  8227.  You can type an ampersand (&) at the end of the response to the "Operations"
  8228.  prompt, for instance, and continue typing operations on the next line. This
  8229.  mechanism is illustrated in Figure 6.1.
  8230.  
  8231.  (This figure may be found in the printed book.)
  8232.  
  8233.  When you run LIB with a response file, the prompts are displayed with the
  8234.  responses. If the response file does not contain responses for all the
  8235.  prompts, LIB uses the default responses.
  8236.  
  8237.  
  8238.  Example
  8239.  
  8240.    GRAPHIC
  8241.    +CIRCLE+WAVE-WAVE*FLASH
  8242.    GRAPHIC.LST
  8243.  
  8244.  Assume that a response file named RESPONSE in the directory B:\ PROJ
  8245.  contains the above lines and you invoke LIB with the command shown below:
  8246.  
  8247.    LIB @B:\PROJ\RESPONSE
  8248.  
  8249.  LIB deletes the module WAVE from the library GRAPHIC.LIB, copies the module
  8250.  FLASH into an object file named FLASH.OBJ, and appends the object files
  8251.  CIRCLE.OBJ and WAVE.OBJ as the last two modules in the library. LIB also
  8252.  creates a cross-reference listing file named GRAPHIC.LST.
  8253.  
  8254.  
  8255.  6.2  LIB Commands
  8256.  
  8257.  The LIB utility can perform a number of library-management functions,
  8258.  including creating a library file, adding an object file as a module to a
  8259.  library, deleting modules from a library, replacing a module in the library
  8260.  file, copying a module to a separate object file, and moving a module out of
  8261.  a library and into an object file.
  8262.  
  8263.  For each library session, LIB reads and interprets commands in the order
  8264.  listed below. It determines whether a new library is being created or an
  8265.  existing library is being examined or modified.
  8266.  
  8267.  
  8268.    1.  LIB processes any deletion and move commands.
  8269.  
  8270.        LIB does not actually delete modules from the existing file. Instead,
  8271.        it marks the selected modules for deletion, creates a new library
  8272.        file, and copies only the modules not marked for deletion into the new
  8273.        library file.
  8274.  
  8275.    2.  LIB processes any addition commands.
  8276.  
  8277.        Like deletions, additions are not performed on the original library
  8278.        file. Instead, the additional modules are appended to the new library
  8279.        file. (If there were no deletion or move commands, a new library file
  8280.        would be created in the addition stage by copying the original library
  8281.        file.)
  8282.  
  8283.  
  8284.  As the LIB utility carries out these commands, it reads the object modules
  8285.  in the library, checks them for validity, and gathers the information
  8286.  necessary to build a library index and a listing file. When you link a
  8287.  library with other object files, the linker uses the library index to search
  8288.  the library.
  8289.  
  8290.  LIB never makes changes to the original library; it copies the library and
  8291.  makes changes to the copy. Therefore, if you press CTRL+C to terminate the
  8292.  session, you do not lose your original library. Therefore, when you run LIB,
  8293.  make sure your disk has enough space for both the original library file and
  8294.  the copy.
  8295.  
  8296.  Once an object file is incorporated into a library, it becomes an object
  8297.  module. The LIB utility makes a distinction between object files and object
  8298.  modules: an object file exists as an independent file while an object module
  8299.  is part of a library file. An object file has a full path name, including a
  8300.  drive designation, directory path name, and file-name extension (usually
  8301.  .OBJ). Object modules have only a name. For example, B:\RUN\SORT.OBJ is an
  8302.  object-file name, while SORT is an object-module name.
  8303.  
  8304.  
  8305.  6.2.1  Creating a Library File
  8306.  
  8307.  To create a new library file, give the name of the library file you want to
  8308.  create in the oldlibrary field of the command line or at the "Library name"
  8309.  prompt. LIB supplies the .LIB extension.
  8310.  
  8311.  If the name of the new library file is the same as the name of an existing
  8312.  library file, LIB assumes that you want to change the existing file. If the
  8313.  name of the new library file is the same as the name of a file that is not a
  8314.  library, LIB issues an error message.
  8315.  
  8316.  When you give the name of a file that does not currently exist, LIB displays
  8317.  the following prompt:
  8318.  
  8319.    Library does not exist. Create? (y/n)
  8320.  
  8321.  Type  y  to create the file, or  n  to terminate the library session. This
  8322.  message does not appear if the name is followed immediately by a command, a
  8323.  comma, or a semicolon.
  8324.  
  8325.  You can specify a page size for the library by specifying the /P option when
  8326.  you create the library (see Section 6.1.1.2). The default page size is 16
  8327.  bytes.
  8328.  
  8329.  Once you have given the name of the new library file, you can insert object
  8330.  modules into the library by using the add-command symbol (+).
  8331.  
  8332.  
  8333.  6.2.2  Add Command (+)
  8334.  
  8335.  Use the add-command symbol (+) to add an object module to a library. Give
  8336.  the name of the object file to be added, without the .OBJ extension,
  8337.  immediately following the plus sign.
  8338.  
  8339.  LIB uses the base name of the object file as the name of the object module
  8340.  in the library. For example, if the object file B:\CURSOR.OBJ is added to a
  8341.  library file, the name of the corresponding object module is CURSOR.
  8342.  
  8343.  Object modules are always added to the end of a library file.
  8344.  
  8345.   Combining libraries
  8346.  
  8347.  You can also use the plus sign to combine two libraries. When you give a
  8348.  library name following the plus sign, a copy of the contents of that library
  8349.  is added to the library file being modified. You must include the .LIB
  8350.  extension when you give a library-file name. Otherwise, LIB uses the default
  8351.  .OBJ extension when it looks for the file. If both libraries contain a
  8352.  module with the same name, LIB ignores the second module of that name. For
  8353.  information on replacing modules, see Section 6.2.4.
  8354.  
  8355.  LIB adds the modules of the library to the end of the library being changed.
  8356.  Note that the added library still exists as an independent library, since
  8357.  LIB copies the modules without deleting them.
  8358.  
  8359.  In addition to allowing DOS libraries as input, LIB also accepts 286 XENIX
  8360.  archives and Intel-format libraries. Therefore, you can use LIB to convert
  8361.  libraries from either of these formats to the DOS format.
  8362.  
  8363.  
  8364.  Examples
  8365.  
  8366.    LIB mainlib +flash;
  8367.  
  8368.  This command adds the file FLASH.OBJ to the library MAINLIB.LIB.
  8369.  
  8370.    LIB math +trig.lib;
  8371.  
  8372.  The command above adds the contents of the library TRIG.LIB to the library
  8373.  MATH.LIB. The library TRIG.LIB is unchanged after this command is executed.
  8374.  
  8375.  
  8376.  
  8377.  6.2.3  Delete Command (-)
  8378.  
  8379.  Use the delete-command symbol (-) to delete an object module from a library.
  8380.  After the minus sign, give the name of the module to be deleted. Module
  8381.  names do not have path names or extensions.
  8382.  
  8383.  
  8384.  Example
  8385.  
  8386.    LIB mainlib -flash;
  8387.  
  8388.  The command shown above deletes the module flash from the library
  8389.  MAINLIB.LIB.
  8390.  
  8391.  
  8392.  6.2.4  Replace Command (- +)
  8393.  
  8394.  Use the replace-command symbol (- +) to replace a module in a library.
  8395.  Following the symbol, give the name of the module to be replaced. Module
  8396.  names do not have path names or extensions.
  8397.  
  8398.  To replace a module, LIB first deletes the existing module, then appends an
  8399.  object file that has the same name as the module. The object file is assumed
  8400.  to have the .OBJ extension and to reside in the current directory; if it
  8401.  does not, give the object-file name with an explicit extension or path.
  8402.  
  8403.  
  8404.  Example
  8405.  
  8406.    LIB mainlib -+flash;
  8407.  
  8408.  This command replaces the module flash in the MAINLIB.LIB library with the
  8409.  contents of FLASH.OBJ from the current directory. Upon completion of this
  8410.  command, the file FLASH.OBJ still exists, and the flash module is updated in
  8411.  MAINLIB.LIB.
  8412.  
  8413.  
  8414.  6.2.5  Copy Command (*)
  8415.  
  8416.  Use the copy-command symbol (*) followed by a module name to copy a module
  8417.  from the library into an object file of the same name. The module remains in
  8418.  the library. When LIB copies the module to an object file, it adds the .OBJ
  8419.  extension to the module name and places the file in the current directory.
  8420.  
  8421.  
  8422.  Example
  8423.  
  8424.    LIB mainlib *flash;
  8425.  
  8426.  This command copies the module flash from the MAINLIB.LIB library to a file
  8427.  called FLASH.OBJ in the current directory. Upon completion of this command,
  8428.  MAINLIB.LIB still contains the module flash.
  8429.  
  8430.  
  8431.  6.2.6  Move Command (- *)
  8432.  
  8433.  Use the move-command symbol (-*) to move an object module from the library
  8434.  file to an object file. This operation is equivalent to copying the module
  8435.  to an object file, then deleting the module from the library.
  8436.  
  8437.  
  8438.  Example
  8439.  
  8440.    LIB mainlib -*flash;
  8441.  
  8442.  This command moves the module flash from the MAINLIB.LIB library to a file
  8443.  called FLASH.OBJ in the current directory. Upon completion of this command,
  8444.  MAINLIB.LIB no longer contains the module flash.
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  Chapter 7  NMAKE
  8450.  ────────────────────────────────────────────────────────────────────────────
  8451.  
  8452.  NMAKE (the Microsoft Program-Maintenance Utility) is a sophisticated command
  8453.  processor that can save time and simplify project management. By determining
  8454.  which project files depend on others, NMAKE can automatically execute the
  8455.  commands needed to update your project when any project file has changed.
  8456.  
  8457.  The advantage of using NMAKE over simple batch files is that NMAKE does only
  8458.  what is needed. You don't waste time rebuilding files that are already
  8459.  up-to-date. NMAKE also has advanced features, such as macros, that help you
  8460.  manage complex projects.
  8461.  
  8462.  
  8463.  7.1  Overview of NMAKE
  8464.  
  8465.  NMAKE works by comparing the times and dates of two sets of files, which are
  8466.  called targets and dependents. A target is normally a file that you want to
  8467.  create, such as an executable file. A dependent is a file used to create a
  8468.  target, such as a C source file.
  8469.  
  8470.  When you run NMAKE, it reads a description file that you supply. The
  8471.  description file consists of one or more blocks. Each block typically lists
  8472.  a target, the target's dependents, and the command that builds the target.
  8473.  NMAKE compares the date and time of the target to those of its dependents.
  8474.  If any dependent has changed more recently than the target, NMAKE updates
  8475.  the target by executing the command listed in the block.
  8476.  
  8477.  NMAKE's main purpose is to help you update applications quickly and simply.
  8478.  However, because it can execute any command, it is not limited to compiling
  8479.  and linking. NMAKE can also make backups, move files, and do many other
  8480.  project management tasks.
  8481.  
  8482.  
  8483.  7.1.1  Using a Command Line to Invoke NMAKE
  8484.  
  8485.  When you run NMAKE, you can supply the description-file name and other
  8486.  arguments using the following syntax:
  8487.  
  8488.    NMAKE «options» «macrodefinitions» «targets »
  8489.  
  8490.  All of the command-line fields are optional. If you don't supply any
  8491.  arguments, NMAKE looks for a default description file named MAKEFILE and
  8492.  follows various other defaults that are described in this chapter.
  8493.  
  8494.  The options field lists NMAKE options, which are described in Section 7.3,
  8495.  "Command-Line Options." To specify the description file, specify the /F
  8496.  option in this field.
  8497.  
  8498.  The macrodefinitions field lists macro definitions, which allow you to
  8499.  replace text in the description file. Macros are described in Section 7.2.3.
  8500.  
  8501.  
  8502.  The targets field lists targets to build. If you do not list any targets,
  8503.  NMAKE builds only the first target in the description file.
  8504.  
  8505.  
  8506.  Example
  8507.  
  8508.    NMAKE /S "program = sample" sort.exe search.exe
  8509.  
  8510.  The command supplies four arguments: an option (/S), a macro definition
  8511.  ("program = sample"), and two target specifications (sort.exe search.exe).
  8512.  
  8513.  Because the command does not specify a description file, NMAKE looks for the
  8514.  default description file, MAKEFILE. The /S option tells NMAKE to suppress
  8515.  the display of commands as they are executed. The macro definition performs
  8516.  a text substitution throughout the description file, replacing every
  8517.  instance of  program  with  sample. The target specifications tell NMAKE to
  8518.  update the targets SORT.EXE and SEARCH.EXE.
  8519.  
  8520.  
  8521.  7.2  NMAKE Description Files
  8522.  
  8523.  You must always supply NMAKE with a description file. In addition to
  8524.  description blocks, which tell NMAKE how to build your project's target
  8525.  files, the description file can contain comments, macros, inference rules,
  8526.  and directives. This section describes all the elements of description
  8527.  files.
  8528.  
  8529.  
  8530.  7.2.1  Description Blocks
  8531.  
  8532.  Description blocks form the heart of the description file. Figure 7.1
  8533.  illustrates a typical NMAKE description block, including the three parts:
  8534.  targets, dependents, and commands.
  8535.  
  8536.  (This figure may be found in the printed book.)
  8537.  
  8538.   A target is a file that you want to build.
  8539.  
  8540.  The targets part of the description block lists one or more files to build.
  8541.  The line that lists targets and dependents is called the dependency line.
  8542.  
  8543.  The example in Figure 7.1 tells NMAKE to build a single target, MYAPP.EXE.
  8544.  Although single targets are common, you can also list multiple targets;
  8545.  separate each target name with a space. If the rightmost target name is one
  8546.  character long, put a space between the name and the colon.
  8547.  
  8548.  The target is normally a file, but it can also be a "pseudotarget," a name
  8549.  that allows you to build groups of files or execute a group of commands. See
  8550.  Section 7.2.6, "Pseudotargets."
  8551.  
  8552.   A dependent is a file used to build a target.
  8553.  
  8554.  The dependents part of the description block lists one or more files from
  8555.  which the target is built. It is separated from the targets part by a colon.
  8556.  The example in Figure 7.1 lists two dependents:
  8557.  
  8558.    myapp.exe : myapp.obj another.obj
  8559.  
  8560.  The example tells NMAKE to build the target MYAPP.EXE whenever MYAPP.OBJ, or
  8561.  ANOTHER.OBJ has changed more recently than MYAPP.EXE.
  8562.  
  8563.  If any dependents of a target are listed as targets in other description
  8564.  blocks, NMAKE builds those files before it builds the original target.
  8565.  Essentially, NMAKE evaluates a "dependency tree" for the entire description
  8566.  file. It builds files in the order needed to update the original target,
  8567.  never building a target until all files that depend on it are up-to-date.
  8568.  
  8569.  The dependent list can also include a list of directories in which NMAKE
  8570.  should search for dependents. The directory list is enclosed in curly braces
  8571.  ( {} ) and precedes the dependent list. NMAKE searches the current directory
  8572.  first, then the directories you list:
  8573.  
  8574.    forward.exe : {\src\alpha;d:\proj}pass.obj
  8575.  
  8576.  In the line above, the target, FORWARD.EXE, has one dependent: PASS.OBJ. The
  8577.  directory list specifies two directories:
  8578.  
  8579.    {\src\alpha;d:\proj}
  8580.  
  8581.  NMAKE begins searching for PASS.OBJ in the current directory. If it is not
  8582.  found, NMAKE searches the \SRC\ALPHA directory, then the D:\PROJ directory.
  8583.  If NMAKE cannot find a dependent in the current directory or a listed
  8584.  directory, it looks for an inference rule that describes how to create the
  8585.  dependent (see Section 7.2.4, "Inference Rules").
  8586.  
  8587.   The commands part of a  description block can contain  one or more
  8588.  commands.
  8589.  
  8590.  The commands part of the description block lists the command(s) NMAKE should
  8591.  use to build the target. This can be any command that you can execute from
  8592.  the command line. The example in Fig 7.1 tells NMAKE to build MYAPP.EXE
  8593.  using the following QLINK command:
  8594.  
  8595.      QLINK /F /PACKC myapp another
  8596.  
  8597.  Notice that the line above is indented. NMAKE uses indentation to
  8598.  distinguish between the dependency line and command line. If the command
  8599.  appears on a separate line, as here, it must be indented at least one space
  8600.  or tab. The dependency line must not be indented (it cannot start with a
  8601.  space or tab).
  8602.  
  8603.  Many targets are built with a single command, but you can place more than
  8604.  one command after the dependency line. A long command can span several lines
  8605.  if each line ends with a backslash ( \ ).
  8606.  
  8607.  You can also place the command at the end of the dependency line. Separate
  8608.  the command from the rightmost dependent with a semicolon.
  8609.  
  8610.  To use CD, CHDIR, or SET in a description block, place the command on a
  8611.  separate line:
  8612.  
  8613.    DIR
  8614.    CD \mydir
  8615.  
  8616.  
  8617.  7.2.1.1  Wild Cards
  8618.  
  8619.  You can use DOS wild-card characters (* and ?) to specify target and
  8620.  dependent file names. NMAKE expands wild cards in target names when it reads
  8621.  the description file. It expands wild cards in the dependent names when it
  8622.  builds the target. For example, the following description block compiles all
  8623.  source files with the .C extension:
  8624.  
  8625.    bondo.exe : *.c
  8626.        CL *.c
  8627.  
  8628.  
  8629.  7.2.1.2  Command Modifiers
  8630.  
  8631.  Command modifiers provide extra control over the command listed in a
  8632.  description block. They are special characters that appear in front of a
  8633.  command. You can use more than one modifier for a single command. The
  8634.  characters are listed in the following list:
  8635.  
  8636.  Character                         Action
  8637.  ────────────────────────────────────────────────────────────────────────────
  8638.  @(At sign)                        Prevents NMAKE from displaying the
  8639.                                    command as it executes. In the example
  8640.                                    below, NMAKE does not display the ECHO
  8641.                                    command line:
  8642.  
  8643.                                    sort.exe : sort.obj
  8644.                                    @ECHO sorting
  8645.  
  8646.                                    The output of the ECHO command appears
  8647.                                    as usual.
  8648.  
  8649.  - (Dash)                          Turns off error checking for the command.
  8650.                                    If the dash is followed by a number,
  8651.                                    NMAKE stops only if the error level
  8652.                                    returned by the command is greater than
  8653.                                    the number. In the following example, if
  8654.                                    the program  sample  returns an error
  8655.                                    code, NMAKE does not stop but continues
  8656.                                    to execute commands:
  8657.  
  8658.                                    light.lst : light.txt
  8659.                                    -sample light.txt
  8660.  
  8661.  ! (Exclamation point)             Executes the command for each dependent
  8662.                                    file if the command uses the predefined
  8663.                                    macros $? or $**. The $? macro refers to
  8664.                                    all dependent files that are out-of-date
  8665.                                    with respect to the target. The $**
  8666.                                    macro refers to all dependent files in
  8667.                                    the description block (see Section 7.2.3,
  8668.                                    "Macros"). For example,
  8669.  
  8670.                                    print:hop.asm skip.bas jump.c
  8671.                                    !print $** lpt1:
  8672.  
  8673.                                    generates the following commands:
  8674.  
  8675.                                    print hop.asm lpt1:
  8676.                                    print skip.bas lpt1:
  8677.                                    print jump.c lpt1:
  8678.  
  8679.  
  8680.  7.2.1.3  Using Control Characters as Literals
  8681.  
  8682.  Occasionally, you may need to list a file name containing a character that
  8683.  NMAKE uses as a control character. These characters are:
  8684.  
  8685.  # ( ) $ ^ \ { } ! @ -
  8686.  
  8687.  To use an NMAKE control character as a literal character, place a caret (^)
  8688.  in front of it. For example, say that you define a macro that ends with a
  8689.  backslash:
  8690.  
  8691.    exepath=c:\bin\
  8692.  
  8693.  The line above is intended to define a macro named  exepath  with the value
  8694.  c:\bin\. But the second backslash causes unexpected results. Since the
  8695.  back-slash is the NMAKE line-continuation character, the line actually
  8696.  defines the macro  exepath  as  c:\bin  followed by whatever appears on the
  8697.  next line of the description file. You can solve the problem by placing a
  8698.  caret in front of the second backslash:
  8699.  
  8700.    exepath=c:\bin^\
  8701.  
  8702.  You can also use a caret to place a literal newline character in a
  8703.  description file. This feature can be useful in macro definitions:
  8704.  
  8705.    XYZ=abc^
  8706.    def
  8707.  
  8708.  NMAKE interprets the example as if you assigned the C-style string  abc\ndef
  8709.   to the  XYZ  macro. This effect differs from using the backslash ( \ ) to
  8710.  continue a line. A newline character that follows a backslash is replaced
  8711.  with a space.
  8712.  
  8713.  Carets that precede noncontrol characters are ignored. The line
  8714.  
  8715.    ign^ore : these ca^rets
  8716.  
  8717.  is interpreted as
  8718.  
  8719.    ignore : these carets
  8720.  
  8721.  A caret that appears in quotation marks is treated as a literal caret
  8722.  character.
  8723.  
  8724.  
  8725.  7.2.1.4  Listing a Target in Multiple Description Blocks
  8726.  
  8727.   You can specify more than one description block for the same target by
  8728.  placing two colons (::) after the target. This feature can be useful for
  8729.  building a complex target, such as a library, that contains components
  8730.  created with different commands.
  8731.  
  8732.  
  8733.  Examples
  8734.  
  8735.    target.lib :: a.asm b.asm c.asm
  8736.       CL a.asm b.asm c.asm
  8737.       LIB target -+a.obj -+b.obj -+c.obj;
  8738.    target.lib :: d.c e.c
  8739.       CL /c d.c e.c
  8740.       LIB target -+d.obj -+e.obj;
  8741.  
  8742.  Both description blocks above update the library named TARGET.LIB. If any of
  8743.  the assembly-language files have changed more recently than the library,
  8744.  NMAKE executes the commands in the first block to assemble the source files
  8745.  and update the library. Similarly, if any of the C-language files have
  8746.  changed, NMAKE executes the second group of commands, which compile the C
  8747.  files and update the library.
  8748.  
  8749.  If you use a single colon in the example above, NMAKE issues an error
  8750.  message. It is legal, however, to use single colons if commands are listed
  8751.  in only one block. In this case, dependency lines are cumulative. For
  8752.  example,
  8753.  
  8754.    target: jump.bas
  8755.    target: up.c
  8756.       echo Building target...
  8757.  
  8758.  is equivalent to
  8759.  
  8760.    target: jump.bas up.c
  8761.       echo Building target...
  8762.  
  8763.  
  8764.  7.2.2  Comments
  8765.  
  8766.  You can place comments in a description file by preceding them with a number
  8767.  sign (#):
  8768.  
  8769.    # This comment appears on its own line
  8770.    huey.exe : huey.obj dewey.obj # Comment on the same line
  8771.       link huey.obj dewey.obj;
  8772.  
  8773.  A comment extends to the end of the line in which it appears. Command lines
  8774.  cannot contain comments.
  8775.  
  8776.  
  8777.  7.2.3  Macros
  8778.  
  8779.   Macros allow you to do text replacements throughout the description file.
  8780.  
  8781.  Macros offer a convenient way to replace a string in the description file
  8782.  with another string. The text is automatically replaced each time you run
  8783.  NMAKE. Macros are useful in a variety of tasks, including the following:
  8784.  
  8785.  
  8786.    ■   To create a standard description file for several projects. The macro
  8787.        represents the file names used in commands. These file names are then
  8788.        defined when you run NMAKE. When you switch to a different project,
  8789.        you can change file names throughout the description file by changing
  8790.        a single macro.
  8791.  
  8792.    ■   To control the options that NMAKE passes to the compiler or linker.
  8793.        When you specify options in a macro, you can change options throughout
  8794.        the description file in one easy step.
  8795.  
  8796.  
  8797.  You can define your own macros or use predefined macros. This section begins
  8798.  by describing user-defined macros.
  8799.  
  8800.  
  8801.  7.2.3.1  User-Defined Macros
  8802.  
  8803.  You can define a macro with:
  8804.  
  8805.    macroname = string
  8806.  
  8807.  The macroname can be any combination of letters, digits, and the underscore
  8808.  ( _ ) character. Macro names are case sensitive. NMAKE interprets  MyMacro
  8809.  and  MYMACRO  as different macro names.
  8810.  
  8811.  The string can be any string, including a null string. For example,
  8812.  
  8813.    command = QLINK
  8814.  
  8815.  defines a macro named  command  and assigns it the string  QLINK.
  8816.  
  8817.  You can define macros in the description file or on the command line. In the
  8818.  description file, you must define each macro on a separate line; the line
  8819.  cannot start with a space or tab. The string can contain embedded spaces,
  8820.  and NMAKE ignores spaces on either side of the equal sign. You do not need
  8821.  to enclose string in quotation marks (if you do, they become part of the
  8822.  string).
  8823.  
  8824.  Slightly different rules apply when you define a macro on the command line,
  8825.  because of the way that the command line handles spaces. You must enclose
  8826.  string in quotation marks if it contains embedded spaces. No spaces can
  8827.  surround the equal sign. You can also enclose the entire macro definition,
  8828.  macroname and string, in quotation marks. For example,
  8829.  
  8830.    NMAKE "program=sample"
  8831.  
  8832.  defines the macro  program, assigning it the value  sample.
  8833.  
  8834.  Once you have defined a macro, you can "undefine" it with the !UNDEF
  8835.  directive (see Section 7.2.5, "Directives").
  8836.  
  8837.  
  8838.  7.2.3.2  Invoking Macros
  8839.  
  8840.   You invoke a macro by enclosing its name in parentheses preceded by a
  8841.  dollar sign ($). (The parentheses are optional if macroname is one character
  8842.  long.) For example, you can invoke the  command  macro defined above as
  8843.  
  8844.    $(command)
  8845.  
  8846.  When NMAKE runs, it replaces every occurrence of  $(command)  with  QLINK.
  8847.  The following description file defines and uses three macros:
  8848.  
  8849.    program = sample
  8850.    c = QLINK
  8851.    options =
  8852.  
  8853.    $(program).exe : $(program).obj
  8854.       $c  $(options)  $(program).obj;
  8855.  
  8856.  NMAKE interprets the description block as
  8857.  
  8858.    sample.exe : sample.obj
  8859.       QLINK    sample.obj;
  8860.  
  8861.  NMAKE replaces every occurrence of  $(program)  with  sample, every instance
  8862.  of  $c  with  QLINK, and every instance of  $(options) with a null string.
  8863.  Because  c  is only one character long, you do not need to enclose it in
  8864.  parentheses.
  8865.  
  8866.  If you invoke a macro that is not defined, NMAKE treats the macro as a null
  8867.  string.
  8868.  
  8869.  Occasionally, you may need to use the dollar sign ($) as a literal
  8870.  character. Use two dollar signs ($$), or precede one with a caret (^$).
  8871.  
  8872.  
  8873.  7.2.3.3  Predefined Macros
  8874.  
  8875.  NMAKE provides several predefined macros, which represent various file names
  8876.  and commands. Predefined macros are useful in their own right, and they are
  8877.  also employed in predefined inference rules, which are described later in
  8878.  Section 7.2.4.3. NMAKE predefined macros are described in the following
  8879.  list:
  8880.  
  8881.  Macro                             Meaning
  8882.  ────────────────────────────────────────────────────────────────────────────
  8883.  $@                                The current target's full name.
  8884.  
  8885.  $*                                The current target's base name (full
  8886.                                    name minus the file extension).
  8887.  
  8888.  $**                               The dependents of the current target.
  8889.  
  8890.  $?                                The dependents that are out-of-date with
  8891.                                    respect to the current target.
  8892.  
  8893.  $$@                               The target that NMAKE is currently
  8894.                                    evaluating. You can use this macro only
  8895.                                    to specify a dependent.
  8896.  
  8897.  $<                                The dependent file that is out-of-date
  8898.                                    with respect to the current target
  8899.                                    (evaluated only for inference rules).
  8900.  
  8901.  $(CC)                             The command to invoke the C compiler. By
  8902.                                    default, $(CC) is predefined as  CC = cl,
  8903.                                    which invokes the optimizing compiler.
  8904.  
  8905.  $(AS)                             The command that invokes the Microsoft
  8906.                                    Macro
  8907.                                    Assembler. NMAKE predefines this macro
  8908.                                    as
  8909.                                    AS = masm.
  8910.  
  8911.  $(AFLAGS)                         The options for the assembler. By
  8912.                                    default, this macro is set to the null
  8913.                                    string. If redefined, it will be used by
  8914.                                    the predefined inference rules.
  8915.  
  8916.  $(CFLAGS)                         The options for the C compiler. By
  8917.                                    default, this macro is set to the null
  8918.                                    string. If redefined, it will be used by
  8919.                                    the predefined inference rules.
  8920.  
  8921.  $(MAKE)                           The name with which the NMAKE utility is
  8922.                                    invoked. This macro is used to invoke
  8923.                                    NMAKE recursively. It causes the line on
  8924.                                    which it appears to be executed even if
  8925.                                    the /N option is on. You can redefine
  8926.                                    this macro if you want to execute
  8927.                                    another
  8928.                                    program.
  8929.  
  8930.                                    The $(MAKE) macro is useful for building
  8931.                                    different versions of a program. The
  8932.                                    following description file invokes NMAKE
  8933.                                    recursively to build targets in the
  8934.                                    VERS1 and VERS2 directories:
  8935.  
  8936.                                    all :vers1 vers2
  8937.                                    vers1  :
  8938.                                    cd vers1
  8939.                                    $(MAKE)
  8940.                                    cd  . .
  8941.                                    vers2 :
  8942.                                    cd vers2
  8943.                                    $(MAKE)
  8944.                                    cd . .
  8945.  
  8946.                                    The example changes to the VERS1
  8947.                                    directory, then invokes NMAKE
  8948.                                    recursively, causing NMAKE to process
  8949.                                    the file MAKEFILE in that directory.
  8950.                                    Then it changes to the VERS2 directory
  8951.                                    and invokes NMAKE again, processing the
  8952.                                    file MAKEFILE in that directory.
  8953.  
  8954.                                    Deeply recursive build procedures can
  8955.                                    exhaust NMAKE's run-time stack, causing
  8956.                                    a run-time error. To eliminate the error,
  8957.                                    use the EXEHDR utility to increase
  8958.                                    NMAKE's run-time stack. The following
  8959.                                    command, for example, gives NMAKE.EXE a
  8960.                                    stack size of 16,384 (0x4000) bytes:
  8961.  
  8962.                                    exehdr /stack:0x4000 nmake.exe
  8963.  
  8964.  $(MAKEFLAGS)                      The NMAKE options currently in effect.
  8965.                                    If you invoke NMAKE recursively, you
  8966.                                    should use the
  8967.                                    command:
  8968.  
  8969.                                    $(MAKE)  $(MAKEFLAGS).
  8970.  
  8971.                                    The following flags are not preserved: A,
  8972.                                    C, D, F, P, R, S, X. You cannot redefine
  8973.                                    this macro.
  8974.  
  8975.  $(MAKEDIR)                        The directory from which NMAKE is
  8976.                                    invoked.
  8977.  
  8978.  Like user-defined macro names, predefined macro names are case sensitive.
  8979.  NMAKE interprets  CC  and  cc  as different macro names.
  8980.  
  8981.   Macro modifiers allow you to specify parts of predefined macros
  8982.  representing file names.
  8983.  
  8984.  You can append characters to the first six macros in the preceding list to
  8985.  modify their meaning. Appending a D specifies the directory part of the file
  8986.  name only, an F specifies the file name, a B specifies just the base name,
  8987.  and an R specifies the complete file name without the extension. If you add
  8988.  one of these characters, you must enclose the macro name in parentheses.
  8989.  (The predefined macros $$@ and $** are the only exceptions to the rule that
  8990.  macro names more than one character long must be enclosed in parentheses.)
  8991.  
  8992.  For example, assume that $@ has the value C:\SOURCE\PROG\SORT.OBJ. The list
  8993.  below shows the effect of combining the special characters with $@:
  8994.  
  8995.  Macro                             Value
  8996.  ────────────────────────────────────────────────────────────────────────────
  8997.  $(@D)                             C:\SOURCE\PROG
  8998.  
  8999.  $(@F)                             SORT.OBJ
  9000.  
  9001.  $(@B)                             SORT
  9002.  
  9003.  $(@R)                             C:\SOURCE\PROG\SORT
  9004.  
  9005.  
  9006.  Examples
  9007.  
  9008.    trig.lib : sin.obj cos.obj arctan.obj
  9009.            !LIB trig.lib -+$?;
  9010.  
  9011.  In the example above, the macro $? represents the names of all dependents
  9012.  that are more recent than the target. The exclamation point causes NMAKE to
  9013.  execute the LIB command once for each dependent in the list. As a result,
  9014.  the LIB command is executed up to three times, each time replacing a module
  9015.  with a newer version.
  9016.  
  9017.    # Include files depend on versions in current directory
  9018.    DIR=c:\include
  9019.    $(DIR)\globals.h : globals.h
  9020.     COPY globals.h $@
  9021.    $(DIR)\types.h : types.h
  9022.     COPY types.h $@
  9023.    $(DIR)\macros.h : macros.h
  9024.     COPY macros.h $@
  9025.  
  9026.  The example above shows the use of NMAKE to update a group of include files.
  9027.  Each of the files GLOBALS.H, TYPES.H, and MACROS.H in the directory
  9028.  C:\INCLUDE depends on its counterpart in the current directory. If one of
  9029.  the include files is out-of-date, NMAKE replaces it with the file of the
  9030.  same name from the current directory.
  9031.  
  9032.  
  9033.  7.2.3.4  Substitution within Macros
  9034.  
  9035.  Just as macros allow you to substitute text in a description file, you can
  9036.  also substitute text within a macro itself. Use the following form:
  9037.  
  9038.    $(macroname:string1 = string2)
  9039.  
  9040.   You can replace text in a macro, as well as in the description file.
  9041.  
  9042.  Every occurrence of string1 is replaced by string2 in the macro macroname.
  9043.  Do not put any spaces or tabs between macroname and the colon. Spaces
  9044.  between the colon and string1 are made part of string1. If string2 is a null
  9045.  string, all occurrences of string1 are deleted from the macroname macro.
  9046.  
  9047.  The following description file illustrates macro substitution:
  9048.  
  9049.    SRCS = prog.c sub1.c sub2.c
  9050.    prog.exe : $(SRCS:.c=.obj)
  9051.            QLINK  $**;
  9052.  
  9053.    DUP : $(SRCS)
  9054.            !COPY $** c:\backup
  9055.  
  9056.  The predefined macro $** stands for the names of all the dependent files
  9057.  (see the list in Section 7.2.3.3). If you invoke the example file with a
  9058.  command line that specifies both targets, NMAKE executes the following
  9059.  commands:
  9060.  
  9061.    QLINK prog.obj sub1.obj sub2.obj;
  9062.  
  9063.    COPY prog.c c:\backup
  9064.    COPY sub1.c c:\backup
  9065.    COPY sub2.c c:\backup
  9066.  
  9067.  The macro substitution does not alter the definition of the  SRCS  macro;
  9068.  rather, it simply replaces the listed characters. When NMAKE builds the
  9069.  target PROG.EXE, it gets the definition for the predefined macro $** (the
  9070.  dependent list) from the dependency line, which specifies the macro
  9071.  substitution in  SRCS. The same is true for the second target,  DUP. In this
  9072.  case, however, no macro substitution is requested;  SRCS  retains its
  9073.  original value, and $** represents the names of the C source files. (In the
  9074.  example above, the target  DUP  is a pseudotarget; Section 7.2.6 describes
  9075.  pseudotargets.)
  9076.  
  9077.  You can also perform substitution in the following predefined macros: $@,
  9078.  $*, $**, $?, and $. The principle is the same as for other macros. The
  9079.  command in the following description block substitutes within a predefined
  9080.  macro:
  9081.  
  9082.    target.abc : depend.xyz
  9083.       echo $(@:targ=blank)
  9084.  
  9085.  If dependent  depend.xyz  is out-of-date relative to target  target.abc,
  9086.  NMAKE executes the command
  9087.  
  9088.    echo blanket.abc
  9089.  
  9090.  The example uses the predefined macro $@, which equals the full name of the
  9091.  current target ( target.abc). It substitutes  blank  for  targ  in the
  9092.  target, resulting in  blanket.abc. Note that you do not put the usual dollar
  9093.  sign in front of the predefined macro. The example uses
  9094.  
  9095.    $(@:targ=blank)
  9096.  
  9097.  instead of
  9098.  
  9099.    $($@:targ=blank)
  9100.  
  9101.  to substitute within the predefined macro $@.
  9102.  
  9103.  
  9104.  7.2.3.5  Inherited Macros
  9105.  
  9106.  When NMAKE executes, it creates macros equivalent to every current
  9107.  environment variable. These are called "inherited" macros because they have
  9108.  the same names and values as the corresponding environment variables. (The
  9109.  inherited macro is all uppercase, however, even if the corresponding
  9110.  environment variable is not.)
  9111.  
  9112.  Inherited macros can be used like other macros. You can also redefine them.
  9113.  The following example redefines the inherited macro  PATH:
  9114.  
  9115.    PATH = c:\tools\bin
  9116.  
  9117.    sample.obj : sample.c
  9118.       CL /c sample.c
  9119.  
  9120.   Inherited macros take their definitions from environment variables.
  9121.  
  9122.  No matter what value PATH had in the DOS environment, it has the value
  9123.  c:\tools\bin  when NMAKE executes the CL command in this description block.
  9124.  Redefining the inherited macro does not affect the original environment
  9125.  variable; when NMAKE terminates, PATH has its original value.
  9126.  
  9127.  The /E option enforces macro inheritance. If you supply this option, NMAKE
  9128.  ignores any attempt to redefine a macro that derives from an environment
  9129.  variable.
  9130.  
  9131.  
  9132.  7.2.3.6  Precedence among Macro Definitions
  9133.  
  9134.  If you define the same macro in more than one place, NMAKE uses the macro
  9135.  with the highest precedence. The precedence from highest to lowest is as
  9136.  follows:
  9137.  
  9138.  
  9139.    1.  Macros defined on the command line
  9140.  
  9141.    2.  Macros defined in a description file or include file
  9142.  
  9143.    3.  Inherited macros
  9144.  
  9145.    4.  Macros defined in the TOOLS.INI file
  9146.  
  9147.    5.  Predefined macros such as CC and AS
  9148.  
  9149.  
  9150.  The /E option defeats any attempt to redefine inherited macros. If you run
  9151.  NMAKE with this option, macros inherited from environment variables override
  9152.  any same-named macros in the description file.
  9153.  
  9154.  
  9155.  7.2.4  Inference Rules
  9156.  
  9157.  Inference rules are templates that NMAKE uses to create files with a given
  9158.  extension. For instance, when NMAKE encounters a description block with no
  9159.  commands, it tries to apply an inference rule that specifies how to create
  9160.  the target from the dependent files, given the two extensions. Similarly, if
  9161.  a dependent file does not exist, NMAKE tries to apply an inference rule that
  9162.  specifies how to create the missing dependent from another file with the
  9163.  same base name.
  9164.  
  9165.   Inference rules tell NMAKE how to create files with a certain extension.
  9166.  
  9167.  Inference rules provide a convenient shorthand for common operations. For
  9168.  instance, you can use an inference rule to avoid repeating the same command
  9169.  in several description blocks.
  9170.  
  9171.  You can define your own inference rules or use predefined inference rules.
  9172.  This section begins by describing user-defined inference rules.
  9173.  
  9174.  
  9175.  7.2.4.1  User-Defined Inference Rules
  9176.  
  9177.  You can define inference rules in the description file or in the TOOLS.INI
  9178.  file. An inference-rule definition lists two file extensions and one or more
  9179.  commands. For instance, the following inference rule tells NMAKE how to
  9180.  build a .OBJ file using a .C file:
  9181.  
  9182.    .C.OBJ:
  9183.       QCL /c $<
  9184.  
  9185.  The first line lists two extensions. The second extension (.OBJ) specifies
  9186.  the type of the desired file and the first (.C) specifies the type of the
  9187.  desired file's dependent. The second line lists the command used to build
  9188.  the desired file. Here, the predefined macro $ represents the name of a
  9189.  dependent that is out-of-date relative to the target.
  9190.  
  9191.  NMAKE could apply the above inference rule to the following description
  9192.  block:
  9193.  
  9194.    sample.obj :
  9195.  
  9196.  The description block lists only a target, SAMPLE.OBJ. Both the dependent
  9197.  and the command are missing. However, given the target's base name and
  9198.  extension, plus the above inference rule, NMAKE has enough information to
  9199.  build the target. NMAKE first looks for a .C file with the same base name as
  9200.  the target. If SAMPLE.C exists, NMAKE compares its date to that of
  9201.  SAMPLE.OBJ (the comparison is triggered by the predefined macro $). If
  9202.  SAMPLE.C has changed more recently, NMAKE compiles it using the QCL command
  9203.  listed in the inference rule:
  9204.  
  9205.    QCL /c sample.c
  9206.  
  9207.  ────────────────────────────────────────────────────────────────────────────
  9208.  NOTE
  9209.  
  9210.  NMAKE applies an inference rule only if the base name of the file it is
  9211.  trying to create matches the base name of a file that already exists. Thus,
  9212.  inference rules are useful only when there is a one-to-one correspondence
  9213.  between the desired file and its dependent. You cannot define an inference
  9214.  rule that replaces several modules in a library, for example.
  9215.  ────────────────────────────────────────────────────────────────────────────
  9216.  
  9217.  
  9218.  7.2.4.2  Extension Search Paths
  9219.  
  9220.  If an inference rule does not specify a search path, as in the example
  9221.  above, NMAKE looks for files in the current directory. You can specify a
  9222.  single path for each of the extensions, using the following form:
  9223.  
  9224.    {frompath}. fromext{topath}. toext:
  9225.            commands
  9226.  
  9227.  NMAKE searches in the frompath directory for files with the fromext
  9228.  extension. It uses commands to create files with the toext extension in the
  9229.  topath directory.
  9230.  
  9231.  
  9232.  7.2.4.3  Predefined Inference Rules
  9233.  
  9234.  NMAKE provides predefined inference rules to perform these common
  9235.  development tasks:
  9236.  
  9237.  
  9238.    ■   Creating a .OBJ file by compiling a .C file
  9239.  
  9240.    ■   Creating a .OBJ file by assembling a .ASM file
  9241.  
  9242.    ■   Creating a .EXE file by compiling a .C file and linking the resulting
  9243.        .OBJ file
  9244.  
  9245.  
  9246.  Table 7.1 describes the predefined inference rules.
  9247.  
  9248.  Table   7.1 Predefined Inference Rules
  9249.  
  9250. ╓┌───────────────┌─────────────────────────┌─────────────────────────────────╖
  9251.  Inference Rule  Command                   Default Action
  9252.  ────────────────────────────────────────────────────────────────────────────
  9253.  .C.OBJ          $(CC) $(CFLAGS) /C $*.C   CL /C $*.C
  9254.  .ASM.OBJ        $(AS) $(AFLAGS) $*;       MASM $*;
  9255.  .C.EXE          $(CC) $(CFLAGS) $*.C      CL $*.C
  9256.  ────────────────────────────────────────────────────────────────────────────
  9257.  
  9258.  
  9259.  For example, say that you have the following description file:
  9260.  
  9261.    sample.exe :
  9262.  
  9263.  Like the previous example, this description block lists a target without any
  9264.  dependents or commands. NMAKE looks at the target's extension (.EXE) and
  9265.  
  9266.  checks for an inference rule that describes how to create a .EXE file. The
  9267.  last rule in Table 7.1 provides this information:
  9268.  
  9269.    .c.exe:
  9270.       $(CC) $(CFLAGS) $*.c
  9271.  
  9272.  To apply this rule, NMAKE first looks for a file with the same base name as
  9273.  the target (SAMPLE) and the .C extension. If SAMPLE.C exists in the current
  9274.  directory, NMAKE executes the command line given in the rule. The command
  9275.  compiles SAMPLE.C and links the resulting file SAMPLE.OBJ to create
  9276.  SAMPLE.EXE.
  9277.  
  9278.  
  9279.  7.2.4.4  Precedence among Inference Rules
  9280.  
  9281.  If the same inference rule is defined in more than one place, NMAKE uses the
  9282.  rule with the highest precedence. The precedence from highest to lowest is
  9283.  
  9284.  
  9285.    1.  Inference rules defined in the description file
  9286.  
  9287.    2.  Inference rules defined in the TOOLS.INI file
  9288.  
  9289.    3.  Predefined inference rules
  9290.  
  9291.  
  9292.  NMAKE uses a predefined inference rule only if no user-defined inference
  9293.  rule exists for the desired operation.
  9294.  
  9295.  
  9296.  7.2.5  Directives
  9297.  
  9298.  Directives allow you to write description files that are similar to batch
  9299.  files. Directives can execute commands conditionally, display error
  9300.  messages, include other files, and turn on or off certain options.
  9301.  
  9302.   NMAKE directives are similar to C preprocessor directives.
  9303.  
  9304.  A directive begins with an exclamation point (!), which must appear at the
  9305.  beginning of the line. You can place spaces between the exclamation point
  9306.  and the directive keyword. The following list describes NMAKE directives:
  9307.  
  9308.  Directive                         Description
  9309.  ────────────────────────────────────────────────────────────────────────────
  9310.  !CMDSWITCHES                      Turns on or off one of four NMAKE
  9311.  {+| -}opt...                      options:
  9312.                                    /D, /I, /N, and /S. If no options are
  9313.                                    specified, the
  9314.                                    options are reset to the way they were
  9315.                                    when NMAKE started. Turn an option on by
  9316.                                    preceding it with a plus sign (+), or
  9317.                                    turn it off by preceding it with a minus
  9318.                                    sign (-). Using this keyword updates the
  9319.                                    MAKEFLAGS macro.
  9320.  
  9321.  !ELSE                             Executes the statements between the
  9322.                                    !ELSE and  !ENDIF keywords if the
  9323.                                    statements preceding the !ELSE keyword
  9324.                                    were not executed.
  9325.  
  9326.  !ENDIF                            Marks the end of the !IF keyword.
  9327.  
  9328.  !ERROR text                       Causes text to be printed and then stops
  9329.                                    execution.
  9330.  
  9331.  !IF constantexpression            Executes the statements between the !IF
  9332.                                    keyword
  9333.                                    and the next !ELSE or !ENDIF keyword if
  9334.                                    constant
  9335.                                    expression evaluates to a nonzero value.
  9336.  
  9337.  !IFDEF macroname                  Executes the statements between the
  9338.                                    !IFDEF keyword and the next !ELSE or
  9339.                                    !ENDIF keyword if macroname is defined.
  9340.                                    NMAKE considers a macro with a null
  9341.                                    value to be defined.
  9342.  
  9343.  !IFNDEF macroname                 Executes the statements between the
  9344.                                    !IFNDEF keyword and the next !ELSE or
  9345.                                    !ENDIF keyword if macroname is not
  9346.                                    defined.
  9347.  
  9348.  !INCLUDE filename                 Reads and evaluates the file filename
  9349.                                    before continuing with the current
  9350.                                    description file. If filename is
  9351.                                    enclosed by angle brackets (< >), NMAKE
  9352.                                    searches for the file in the directories
  9353.                                    specified by the
  9354.                                    INCLUDE macro. Otherwise, it looks only
  9355.                                    in the
  9356.                                    current directory. The INCLUDE macro is
  9357.                                    initially set to the value of the
  9358.                                    INCLUDE environment
  9359.                                    variable.
  9360.  
  9361.  !UNDEF macroname                  Marks macroname as being undefined in
  9362.                                    NMAKE's symbol table.
  9363.  
  9364.  The constantexpression used with the !IF directive can consist of integer
  9365.  constants, string constants, or program invocations. Integer constants can
  9366.  use the C unary operators for numerical negation (-), one's complement (~),
  9367.  and logical negation (!). They can also use any of the C binary operators
  9368.  listed below:
  9369.  
  9370.  Operator                          Description
  9371.  ────────────────────────────────────────────────────────────────────────────
  9372.  +                                 Addition
  9373.  
  9374.  -                                 Subtraction
  9375.  
  9376.  *                                 Multiplication
  9377.  
  9378.  /                                 Division
  9379.  
  9380.  %                                 Modulus
  9381.  
  9382.  &                                 Bitwise AND
  9383.  
  9384.  |                                 Bitwise OR
  9385.  
  9386.  ^^                                Bitwise XOR
  9387.  
  9388.  &&                                Logical AND
  9389.  
  9390.  ||                                Logical OR
  9391.  
  9392.  <<                                Left shift
  9393.  
  9394.  >>                                Right shift
  9395.  
  9396.  ==                                Equality
  9397.  
  9398.  !=                                Inequality
  9399.  
  9400.  <                                 Less than
  9401.  
  9402.  >                                 Greater than
  9403.  
  9404.  <=                                Less than or equal to
  9405.  
  9406.  >=                                Greater than or equal to
  9407.  
  9408.  You can group expressions using parentheses. NMAKE treats numbers as decimal
  9409.  unless they start with 0 (octal) or 0x (hexadecimal). Use the equality (==)
  9410.  operator to compare two strings for equality or the inequality (!=) operator
  9411.  to compare for inequality. Enclose strings within quotes. Program
  9412.  invocations must be in square brackets ([ ]).
  9413.  
  9414.  
  9415.  Example
  9416.  
  9417.    !INCLUDE <infrules.txt>
  9418.    !CMDSWITCHES +D
  9419.    winner.exe:winner.obj
  9420.    !IFDEF debug
  9421.    !  IF "$(debug)"=="y"
  9422.         QLINK /CO winner.obj;
  9423.    !  ELSE
  9424.         QLINK winner.obj;
  9425.    !  ENDIF
  9426.    !ELSE
  9427.    !  ERROR Macro named debug is not defined.
  9428.    !ENDIF
  9429.  
  9430.  In the example above, the !INCLUDE directive causes NMAKE to insert the file
  9431.  INFRULES.TXT into the description file. The !CMDSWITCHES directive turns on
  9432.  the /D option, which displays the dates of the files as they are checked. If
  9433.  WINNER.EXE is out-of-date with respect to WINNER.OBJ, the !IFDEF directive
  9434.  checks to see if the macro  debug  is defined. If it is defined, the !IF
  9435.  directive checks to see if it is set to  y. If it is, the linker is invoked
  9436.  with the /CO option; otherwise it is invoked without. If the  debug  macro
  9437.  is not defined, the !ERROR directive prints the message and NMAKE stops.
  9438.  
  9439.  
  9440.  7.2.6  Pseudotargets
  9441.  
  9442.  Pseudotargets are useful for building a group of files or executing a group
  9443.  of commands.
  9444.  
  9445.  A pseudotarget is similar to a target, but it is not a file. It is a name
  9446.  that serves as a "handle" for building a group of files or executing a group
  9447.  of commands. In the following example,  UPDATE  is a pseudotarget.
  9448.  
  9449.    UPDATE: *.*
  9450.     !COPY $** a:\product
  9451.  
  9452.  When NMAKE evaluates a pseudotarget, it always considers the dependents to
  9453.  be out-of-date. In the example, NMAKE copies each of the dependent files to
  9454.  the specified drive and directory.
  9455.  
  9456.  Like macro names, pseudotarget names are case sensitive. Predefined
  9457.  pseudotarget names are all uppercase.
  9458.  
  9459.  Predefined pseudotargets provide special rules in a description file. You
  9460.  can use their names on the command line, in a description file, or in the
  9461.  TOOLS.INI file. You need not specify them as targets; NMAKE uses the rules
  9462.  they define no matter where they appear. NMAKE's predefined pseudotargets
  9463.  are described in the following list:
  9464.  
  9465.  Pseudotarget                      Action
  9466.  ────────────────────────────────────────────────────────────────────────────
  9467.  .IGNORE :                         Ignores exit codes returned by programs
  9468.                                    called from the description file. Same
  9469.                                    effect as invoking NMAKE with the /I
  9470.                                    option.
  9471.  
  9472.  .PRECIOUS : target(s)...          Tells NMAKE not to delete target(s) if
  9473.                                    the commands that build it are quit or
  9474.                                    interrupted. Using this pseudotarget
  9475.                                    overrides the NMAKE default. By default,
  9476.                                    NMAKE deletes the target if it cannot be
  9477.                                    sure the target is built successfully.
  9478.  
  9479.  .SILENT :                         Does not display lines as they are
  9480.                                    executed. Same effect as invoking NMAKE
  9481.                                    with the /S option.
  9482.  
  9483.  .SUFFIXES : list...               Lists file suffixes for NMAKE to try
  9484.                                    when building a target file for which no
  9485.                                    dependents are specified. This list is
  9486.                                    used together with inference rules. See
  9487.                                    Section 7.2.4, "Inference Rules."
  9488.  
  9489.                                    When NMAKE finds a target without any
  9490.                                    dependents, it searches the current
  9491.                                    directory for a file with the same base
  9492.                                    name as the target and a suffix from the
  9493.                                    list. If NMAKE finds such a file, and if
  9494.                                    an inference rule applies to the file,
  9495.                                    then NMAKE treats the file as a
  9496.                                    dependent of the target. The order of
  9497.                                    the suffixes in the list defines the
  9498.                                    order in which NMAKE searches for the
  9499.                                    file. The list is predefined as follows:
  9500.  
  9501.                                    .SUFFIXES: .obj .exe .c .asm
  9502.  
  9503.                                    To add suffixes to the list, specify
  9504.                                    .SUFFIXES : followed by the new suffixes.
  9505.                                    To clear the list, specify
  9506.                                    .SUFFIXES:
  9507.  
  9508.  
  9509.  7.3  Command-Line Options
  9510.  
  9511.  NMAKE accepts a number of options. You can specify options in uppercase or
  9512.  lowercase and use either a slash or dash. For example, -A, /A, -a, and /a
  9513.  all represent the same option. The NMAKE options are described in the
  9514.  following list:
  9515.  
  9516.  Option                            Action
  9517.  ────────────────────────────────────────────────────────────────────────────
  9518.  /A                                Builds all of the requested targets even
  9519.                                    if they are not out-of-date.
  9520.  
  9521.  /C                                Suppresses nonfatal error or warning
  9522.                                    messages and the NMAKE logo display.
  9523.  
  9524.  /D                                Displays the modification date of each
  9525.                                    file.
  9526.  
  9527.  /E                                Causes environment variables to override
  9528.                                    macro definitions in description files.
  9529.                                    See Section 7.2.3, "Macros."
  9530.  
  9531.  /F filename                       Specifies filename as the name of the
  9532.                                    description file. If you supply a dash
  9533.                                    (-) instead of a file name, NMAKE gets
  9534.                                    input from the standard input device
  9535.                                    instead of the description file.
  9536.  
  9537.  /HELP                             Displays NMAKE command syntax.
  9538.  
  9539.  /I                                Ignores return codes from commands
  9540.                                    listed in the description file. NMAKE
  9541.                                    processes the whole description file
  9542.                                    even if errors occur.
  9543.  
  9544.  /N                                Displays, but does not execute, the
  9545.                                    description file's commands. This option
  9546.                                    is useful for debugging
  9547.                                    description files and checking which
  9548.                                    targets are
  9549.                                    out-of-date.
  9550.  
  9551.  /NOLOGO                           Suppresses the NMAKE logo display.
  9552.  
  9553.  /P                                Displays all macro definitions and
  9554.                                    target descriptions on the standard
  9555.                                    output device.
  9556.  
  9557.  /Q                                Returns zero if the target is up-to-date
  9558.                                    and nonzero if it is not. This option is
  9559.                                    useful when running NMAKE from a batch
  9560.                                    file.
  9561.  
  9562.  /R                                Ignores inference rules and macros that
  9563.                                    are predefined or defined in the
  9564.                                    TOOLS.INI file.
  9565.  
  9566.  /S                                Suppresses the display of commands
  9567.                                    listed in the description file.
  9568.  
  9569.  /T                                Changes the modification dates for
  9570.                                    out-of-date target files to the current
  9571.                                    date.
  9572.  
  9573.  /X filename                       Sends all error output to filename,
  9574.                                    which can be a file or a device. If you
  9575.                                    supply a dash (-) instead of a file name,
  9576.                                    the error output is sent to the standard
  9577.                                    output device.
  9578.  
  9579.  
  9580.  Examples
  9581.  
  9582.    NMAKE /f sample.mak /c targ1 targ2
  9583.  
  9584.  The command in the above example specifies two NMAKE options.
  9585.  
  9586.  The /f option tells NMAKE to read the description file SAMPLE.MAK. The /c
  9587.  option tells NMAKE not to display nonfatal error messages and warnings. The
  9588.  command lists two targets (targ1  and  targ2) to update.
  9589.  
  9590.    NMAKE  /D /N targ1
  9591.  
  9592.  In the example above, NMAKE updates the target  targ1. The /D option
  9593.  displays the modification date of each file; the /N option displays the
  9594.  commands without executing them.
  9595.  
  9596.  
  9597.  7.4  Using a Response File to Invoke NMAKE
  9598.  
  9599.  Occasionally, you may need to give NMAKE a long list of command-line
  9600.  arguments that exceeds the maximum length of a command line (128 characters
  9601.  in DOS). To do this, place the command arguments in a file, then give the
  9602.  name of the file when you run NMAKE.
  9603.  
  9604.  For instance, say that you create a file named UPDATE, which consists of
  9605.  this line:
  9606.  
  9607.    /S "program = sample" sort.exe search.exe
  9608.  
  9609.  If you start NMAKE with the command
  9610.  
  9611.    NMAKE @update
  9612.  
  9613.  NMAKE reads its command-line arguments from UPDATE. The at sign (@) tells
  9614.  NMAKE to read arguments from the file. The effect is the same as if you
  9615.  typed the arguments directly on the command line:
  9616.  
  9617.    NMAKE /S "program = sample" sort.exe search.exe
  9618.  
  9619.  Within the file, line breaks between arguments are treated as spaces. Macro
  9620.  definitions that contain spaces must be enclosed in quotation marks, just as
  9621.  if you typed them on the command line. You can continue a macro definition
  9622.  across multiple lines by ending each line except the last with a backslash (
  9623.  \ ):
  9624.  
  9625.    /S "program \
  9626.    = sample" sort.exe search.exe
  9627.  
  9628.  This file is equivalent to the first example. The backslash in the example
  9629.  allows the macro definition ("program = sample") to span two lines.
  9630.  
  9631.  
  9632.  7.5  The TOOLS.INI File
  9633.  
  9634.  You can customize NMAKE by placing commonly used macros and inference rules
  9635.  in the TOOLS.INI initialization file. Settings for NMAKE must follow a line
  9636.  that begins with  [NMAKE]. This part of the initialization file can contain
  9637.  macro definitions, .SUFFIXES lists, and inference rules. For example,
  9638.  
  9639.    [NMAKE]
  9640.    CC=cl
  9641.    CFLAGS=-Gc -Gs -W3 -Olt
  9642.    .c.obj:
  9643.        $(CC) -c $(CFLAGS) $*.c
  9644.  
  9645.  If TOOLS.INI contains the code above, NMAKE reads and applies the lines
  9646.  following  [NMAKE]. The example defines the macros CC and CFLAGS and
  9647.  redefines the inference rule for making .OBJ files from .C sources.
  9648.  
  9649.  NMAKE looks for TOOLS.INI in the current directory. If it is not found
  9650.  there, NMAKE searches the directory specified by the INIT environment
  9651.  variable.
  9652.  
  9653.  
  9654.  7.6  In-Line Files
  9655.  
  9656.  NMAKE can write "in-line files," which can contain any text you specify. One
  9657.  use for in-line files is to write a response file for another utility such
  9658.  as LIB. (Response files are useful when you need to supply a program with a
  9659.  long list of arguments that exceeds the maximum length of the command line.)
  9660.  
  9661.  
  9662.  Use this syntax to create an in-line file:
  9663.  
  9664.    target : dependents
  9665.       command << «filename»
  9666.    inlinetext
  9667.    <<«KEEP | NOKEEP»
  9668.  
  9669.  All of the text between the two sets of double angle brackets () is placed
  9670.  in the in-line file. The filename is optional. If you don't supply filename,
  9671.  NMAKE gives the in-line file a unique name. NMAKE places the in-line file in
  9672.  the current directory or, if the TMP environment variable is defined, in the
  9673.  directory specified by TMP.
  9674.  
  9675.  The in-line file can be temporary or permanent. If you don't specify
  9676.  otherwise, or if you specify NOKEEP, it is temporary. Specify KEEP to retain
  9677.  the file.
  9678.  
  9679.  The following example creates a LIB response file named LIB.LRF:
  9680.  
  9681.    math.lib : add.obj sub.obj mul.obj div.obj
  9682.      LIB @<<lib.lrf
  9683.    math.lib
  9684.    -+add.obj-+sub.obj-+mul.obj-+div.obj
  9685.    listing
  9686.    <<KEEP
  9687.  
  9688.  The resulting response file tells LIB which library to use, the commands to
  9689.  execute, and the listing file to produce:
  9690.  
  9691.    math.lib
  9692.    -+add.obj-+sub.obj-+mul.obj-+div.obj
  9693.    listing
  9694.  
  9695.  The in-line file specification can create more than one in-line file. For
  9696.  instance,
  9697.  
  9698.    target.abc : depend.xyz
  9699.       cat <<file1 <<file2
  9700.    I am the contents of file1.
  9701.    <<KEEP
  9702.    I am the contents of file2.
  9703.    <<KEEP
  9704.  
  9705.  The example creates two in-line files named FILE1 and FILE2; then NMAKE
  9706.  executes the command:
  9707.  
  9708.    CAT file1 file2
  9709.  
  9710.  The KEEP keywords tell NMAKE not to delete FILE1 and FILE2 when done.
  9711.  
  9712.  
  9713.  7.7  NMAKE Operations Sequence
  9714.  
  9715.  If you are writing a complex description file, you may need to know the
  9716.  exact order of steps that NMAKE follows. This section describes those steps
  9717.  in order.
  9718.  
  9719.  When you run NMAKE from the command line, its first task is to find the
  9720.  description file, following these steps:
  9721.  
  9722.  
  9723.    1.  If NMAKE is invoked with the /F option, it uses the file name
  9724.        specified in the option.
  9725.  
  9726.    2.  If /F is not specified, NMAKE looks for a file named MAKEFILE in the
  9727.        current directory. If such a file exists, it is used as a description
  9728.        file.
  9729.  
  9730.    3.  If NMAKE still has not found a description file, it returns an error.
  9731.  
  9732.  
  9733.  NMAKE stops searching for a description file as soon as it finds one, even
  9734.  if other potential description files exist. If you specify /F, NMAKE uses
  9735.  the file specified by that option even if MAKEFILE exists in the current
  9736.  directory.
  9737.  
  9738.   If you do not specify targets, NMAKE updates only the first target in the
  9739.  description file.
  9740.  
  9741.  Next, NMAKE updates every target listed on the command line. If none is
  9742.  listed, NMAKE updates only the first target in the description file.NMAKE
  9743.  then applies macro definitions and inference rules in the following order,
  9744.  from highest to lowest priority:
  9745.  
  9746.  
  9747.    1.  Macros defined on the command line
  9748.  
  9749.    2.  Macros defined in a description file or include file
  9750.  
  9751.    3.  Inherited macros
  9752.  
  9753.    4.  Macros defined in the TOOLS.INI file
  9754.  
  9755.    5.  Predefined macros such as CC and AS
  9756.  
  9757.  
  9758.  The /E option causes inherited macros to override macros defined on the
  9759.  command line. The /R option causes NMAKE to ignore macros and inference
  9760.  rules that are predefined or defined in TOOLS.INI. If a macro is defined
  9761.  more than once in any file, the last definition is used.
  9762.  
  9763.  NMAKE updates the specified targets in the order in which they appear on the
  9764.  command line. For each target, NMAKE checks the date and time of each
  9765.  dependent and, if the dependent has changed more recently than the target,
  9766.  performs the commands needed to update the target. If the dependents are
  9767.  themselves targets that are out-of-date, NMAKE updates them first, in the
  9768.  order they appear in the description block. If you specify a pseudotarget,
  9769.  or if you use the /A option, NMAKE updates the target even if it is not
  9770.  out-of-date with respect to its dependents.
  9771.  
  9772.  If the target has no explicit dependents, NMAKE looks in the current
  9773.  directory for one or more files whose extensions are in the .SUFFIXES list.
  9774.  If it finds such files, NMAKE treats them as dependents and updates the
  9775.  target according to the commands.
  9776.  
  9777.  If no commands are given to update the target or if the dependents cannot be
  9778.  found, NMAKE applies inference rules to build the target. By default, it
  9779.  tries to build .EXE files from .OBJ files; it also tries to build .OBJ files
  9780.  from .C and .ASM sources. In practice, this means you should specify .OBJ
  9781.  files as dependents, because NMAKE compiles your source files when it can't
  9782.  find the .OBJ files.
  9783.  
  9784.  NMAKE normally quits processing the description file when a command  returns
  9785.  an error. In addition, if it cannot tell that the target was built
  9786.  successfully, NMAKE deletes the partially created target. If you use the /I
  9787.  commandline option, NMAKE ignores exit codes and attempts to continue
  9788.  processing. The .IGNORE pseudotarget has the same effect. To prevent NMAKE
  9789.  from  deleting the partially created target, specify the target name in the
  9790.  .PRECIOUS pseudotarget.
  9791.  
  9792.  Alternatively, you can use the dash (-) command modifier to ignore the error
  9793.  code for an individual command. An optional number after the dash tells
  9794.  NMAKE to continue if the command returns an error code that is less than or
  9795.  equal to the number, and to stop if the error code is greater than the
  9796.  number.
  9797.  
  9798.  You can help document errors by using the !ERROR directive to print
  9799.  descriptive text. The directive causes NMAKE to print some text, then stop,
  9800.  even if you use /I, .IGNORE, or the dash (-) modifier.
  9801.  
  9802.  
  9803.  
  9804.  
  9805.  
  9806.  
  9807.  Appendix A  Exit Codes
  9808.  ────────────────────────────────────────────────────────────────────────────
  9809.  
  9810.  Most of the utilities return an exit code (sometimes called an "errorlevel"
  9811.  code) that can be used by DOS batch files or other programs such as NMAKE.
  9812.  If the program finishes without errors, it returns exit code 0. The code
  9813.  returned is nonzero if the program encounters an error. This appendix
  9814.  discusses several uses for exit codes and lists the exit codes that can be
  9815.  returned by each utility.
  9816.  
  9817.  
  9818.  A.1  Exit Codes with NMAKE
  9819.  
  9820.  The Microsoft Program-Maintenance Utility (NMAKE) automatically stops
  9821.  execution if a program executed by one of the commands in the NMAKE
  9822.  description file encounters an error. (Invoke NMAKE with the /I option to
  9823.  disable this behavior for the entire description file. Or, place a minus
  9824.  sign (-) in front of a command to disable it for that command only.) The
  9825.  exit code returned by the program is displayed as part of the error message.
  9826.  
  9827.  
  9828.  For example, assume the NMAKE description file TEST contains the following
  9829.  lines:
  9830.  
  9831.    TEST.OBJ :     TEST.C
  9832.          QCL /c TEST.C
  9833.  
  9834.  If the source code in TEST.C contains a program error (not a warning error),
  9835.  you would see the following message the first time you use NMAKE with the
  9836.  description file TEST:
  9837.  
  9838.    "nmake: fatal error U1077: return code 2"
  9839.  
  9840.  This error message indicates that the command  QCL /c TEST.C  in the NMAKE
  9841.  description file returned exit code 2.
  9842.  
  9843.  You can also test exit codes in NMAKE description files with the !IF
  9844.  directive.
  9845.  
  9846.  
  9847.  A.2  Exit Codes with DOS Batch Files
  9848.  
  9849.  If you prefer to use DOS batch files instead of NMAKE description files, you
  9850.  can test the code returned with the IF command. The following sample batch
  9851.  file, called COMPILE.BAT, illustrates how to do this:
  9852.  
  9853.    QCL /c %1.C
  9854.    IF NOT ERRORLEVEL 1 QLINK %1;
  9855.    IF NOT ERRORLEVEL 1 %1
  9856.  
  9857.  You can execute this sample batch file with the following command:
  9858.  
  9859.    COMPILE TEST
  9860.  
  9861.  DOS then executes the first line of the batch file, substituting TEST for
  9862.  the parameter %1, as in the following command line:
  9863.  
  9864.    QCL /c TEST.C
  9865.  
  9866.  It returns exit code 0 if the compilation is successful, or a higher code if
  9867.  the compiler encounters an error. In the second line, DOS tests to see if
  9868.  the code returned by the previous line is 1 or higher. If it is not (that
  9869.  is, if the code is 0), DOS executes the following command:
  9870.  
  9871.    QLINK TEST;
  9872.  
  9873.  QLINK also returns a code, which is tested by the third line. If this code
  9874.  is 0, the TEST program is executed.
  9875.  
  9876.  The compiler returns the following exit codes:
  9877.  
  9878.  Code                              Meaning
  9879.  ────────────────────────────────────────────────────────────────────────────
  9880.  0                                 No error
  9881.  
  9882.  Nonzero number                    Program or system-level error
  9883.  
  9884.  
  9885.  A.3  Exit Codes for Programs
  9886.  
  9887.  An exit code 0 always indicates execution of the program with no fatal
  9888.  errors. Warning errors also return exit code 0. NMAKE can return several
  9889.  codes indicating different kinds of errors, while other programs return only
  9890.  one code to indicate that an error occurred.
  9891.  
  9892.  
  9893.  A.3.1  QLINK Exit Codes
  9894.  
  9895.  The linker returns the following exit codes:
  9896.  
  9897.  Code                              Meaning
  9898.  ────────────────────────────────────────────────────────────────────────────
  9899.  0                                 No error.
  9900.  
  9901.  2                                 Program error. Commands or files given
  9902.                                    as input to the linker produced the
  9903.                                    error.
  9904.  
  9905.  4                                 System error. The linker encountered one
  9906.                                    of the
  9907.                                    following problems: 1) ran out of space
  9908.                                    on output
  9909.                                    files; 2) was unable to reopen the
  9910.                                    temporary file;
  9911.                                    3) experienced an internal error; 4) was
  9912.                                    interrupted by the user.
  9913.  
  9914.  
  9915.  A.3.2  LIB Exit Codes
  9916.  
  9917.  The Microsoft Library Manager (LIB) returns the following exit codes:
  9918.  
  9919.  Code                              Meaning
  9920.  ────────────────────────────────────────────────────────────────────────────
  9921.  0                                 No error.
  9922.  
  9923.  2                                 Program error. Commands or files given
  9924.                                    as input to the utility produced the
  9925.                                    error.
  9926.  
  9927.  4                                 System error. The library manager
  9928.                                    encountered one of the following
  9929.                                    problems: 1) ran out of memory; 2)
  9930.                                    experienced an internal error; 3) was
  9931.                                    interrupted by the user.
  9932.  
  9933.  
  9934.  A.3.3  NMAKE Exit Codes
  9935.  
  9936.  NMAKE returns the following exit codes:
  9937.  
  9938.  Code                              Meaning
  9939.  ────────────────────────────────────────────────────────────────────────────
  9940.  0                                 No error
  9941.  
  9942.  2                                 Program error
  9943.  
  9944.  4                                 System error─out of memory
  9945.  
  9946.  If a program called by a command in the NMAKE description file produces an
  9947.  error, the exit code is displayed in the NMAKE error message.
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  Appendix B  Working with QuickC Compiler Memory Models
  9955.  ────────────────────────────────────────────────────────────────────────────
  9956.  
  9957.  You can gain greater control over the way your program uses memory by
  9958.  specifying the memory model for the program. You do not need to specify a
  9959.  memory model except in the following cases:
  9960.  
  9961.  
  9962.    ■   Your program has more than 64K of code or more than 64K of static
  9963.        data.
  9964.  
  9965.    ■   Your program contains individual arrays that need to be larger than
  9966.        64K.
  9967.  
  9968.  
  9969.  In these cases, you have the following options:
  9970.  
  9971.  
  9972.    1.  If you are compiling with the QCL command, you can specify one of the
  9973.        other standard memory models (medium, compact, large, or huge) using
  9974.        one of the /A options.
  9975.  
  9976.    2.  You can create a mixed-model program using the _near, _far, and _huge
  9977.        keywords.
  9978.  
  9979.    3.  You can combine method 2 with method 1.
  9980.  
  9981.  
  9982.  
  9983.  B.1  Near, Far, and Huge Addressing
  9984.  
  9985.  The terms "near," "far," and "huge" are crucial to understanding the concept
  9986.  of memory models. These terms indicate how data can be accessed in the
  9987.  segmented architecture of the 8086 family of microprocessors (8086, 80186,
  9988.  and 80286).
  9989.  
  9990.   Segments
  9991.  
  9992.  DOS loads the code and data allocated by your program into segments in
  9993.  physical memory. Each segment can be up to 64K long. Separate segments are
  9994.  always allocated for the program code and data, except for tiny-model
  9995.  programs, in which only one segment is allocated for both code and data. For
  9996.  other memory models, the minimum number of segments allocated for a program
  9997.  is two. These two segments are called the default segments. The small memory
  9998.  model uses only the two default segments. The other memory models discussed
  9999.  in this appendix allow more than one code segment per program, or more than
  10000.  one data segment per program, or both.
  10001.  
  10002.   Near addresses
  10003.  
  10004.  In the 8086 family of microprocessors, all memory addresses consist of two
  10005.  parts:
  10006.  
  10007.  
  10008.    1.  A 16-bit number that represents the base address of a memory segment
  10009.  
  10010.    2.  Another 16-bit number that gives an offset within that segment
  10011.  
  10012.  
  10013.  The architecture of the 8086 microprocessor is such that code can be
  10014.  accessed within the default code or data segment by using just the 16-bit
  10015.  offset value. This is possible because the segment addresses for the default
  10016.  segments are always known. This 16-bit offset value is called a "near
  10017.  address"; it can be accessed with a "near pointer." Because only 16-bit
  10018.  arithmetic is required to access any near item, near references to code or
  10019.  data are smaller and more efficient.
  10020.  
  10021.   Far addresses
  10022.  
  10023.  When data or code lie outside the default segments, the address must use
  10024.  both the segment and offset values. Such addresses are called "far
  10025.  addresses"; they can be accessed by using "far pointers" in a C program.
  10026.  Accessing far data or code items is more expensive in terms of program speed
  10027.  and size, but using them en-ables your programs to address all memory,
  10028.  rather than just the standard 64K code and data segments.
  10029.  
  10030.   Huge addresses
  10031.  
  10032.  There is a third type of address used with the Microsoft QuickC Compiler:
  10033.  the "huge address." A huge address is similar to a far address in that both
  10034.  consist of a segment value and an offset value; but the two differ in the
  10035.  way address arithmetic is performed on pointers. Because items (both code
  10036.  and data) referenced by far pointers are still assumed to lie completely
  10037.  within the segment in which they start, pointer arithmetic is done only on
  10038.  the offset portion of the address. This gain in pointer arithmetic
  10039.  efficiency is achieved, however, by limiting the size of any single item to
  10040.  64K. With data items, huge pointers overcome this size limitation: pointer
  10041.  arithmetic is performed on all 32 bits of the data item's address, thus
  10042.  allowing data items referenced by huge pointers to span more than one
  10043.  segment, provided they conform to the rules outlined in Section B.2.6,
  10044.  "Creating Huge-Model Programs."
  10045.  
  10046.  The rest of this chapter deals with the various methods you can use to
  10047.  control whether your program makes near or far calls to access code or data.
  10048.  
  10049.  
  10050.  
  10051.  B.2  Using the Standard Memory Models
  10052.  
  10053.  The libraries created by the SETUP program support six standard memory
  10054.  models. Using the standard memory models is the simplest way to control how
  10055.  your program accesses code and data in memory.
  10056.  
  10057.  When you use the standard memory models, the compiler handles library
  10058.  support for you. The library corresponding to the memory model you specify
  10059.  is used automatically. All memory models, except the tiny and huge models,
  10060.  have their own libraries. The tiny model uses the same library as the small
  10061.  model, and the huge model uses the same library as the large model.
  10062.  
  10063.  The advantage of using standard models for your programs is simplicity. In
  10064.  the standard models, memory management is specified by compiler options;
  10065.  since the standard models do not require the use of extended keywords, they
  10066.  are the best way to write code that can be ported to other systems
  10067.  (particularly systems that do not use segmented architectures).
  10068.  
  10069.  The disadvantage of using standard memory models exclusively is that they
  10070.  may not produce the most efficient code. For example, if you have an
  10071.  otherwise small-model program containing a large array that pushes the total
  10072.  data size for your program over the 64K limit for small model, it may be to
  10073.  your advantage to declare the one array with the _far keyword, while keeping
  10074.  the rest of the program small model, as opposed to using the standard
  10075.  compact memory model for the entire program. For maximum flexibility and
  10076.  control over how your program uses memory, you can combine the
  10077.  standard-memory-model method with the _near, _far, and _huge keywords,
  10078.  described in Section B.3.
  10079.  
  10080.  The /A options for QCL are used to specify one of the six standard memory
  10081.  models (tiny, small, medium, compact, large, or huge) at compile time. These
  10082.  memory-model options are discussed in the next six sections.
  10083.  
  10084.  Note that in the following sections, which describe the different
  10085.  memory-model addressing conventions, it is important to keep in mind two
  10086.  common features of all six models:
  10087.  
  10088.  
  10089.    1.  No single source module can generate 64K or more of code.
  10090.  
  10091.    2.  No single data item can exceed 64K, unless it appears in a huge-model
  10092.        program or it has been declared with the _huge keyword.
  10093.  
  10094.  
  10095.  
  10096.  B.2.1  Creating Tiny-Model Programs
  10097.  
  10098.  The /AT option tells the compiler to create a program that occupies one
  10099.  segment, which contains both code and data. A tiny-model program, including
  10100.  code and data, cannot exceed 64K in size. Thus the tiny model produces the
  10101.  smallest programs, though they offer no speed advantage over small-model
  10102.  programs.
  10103.  
  10104.  The tiny memory model produces .COM files instead of .EXE files. To produce
  10105.  .COM files, specify the /T option when linking. This will link the object
  10106.  files with CRTCOM.LIB, which contains code needed by .COM files.
  10107.  
  10108.  Figure B.1 illustrates how memory is set up for the tiny memory model.
  10109.  
  10110.  (This figure may be found in the printed book.)
  10111.  
  10112.  
  10113.  B.2.2  Creating Small-Model Programs
  10114.  
  10115.  The /AS option tells the compiler to create a program that occupies the two
  10116.  default segments─one for code and one for data.
  10117.  
  10118.  Small-model programs are typically QuickC programs that are short or have a
  10119.  limited purpose. Because code and data for these programs are each limited
  10120.  to 64K, the total size of a small-model program can never exceed 128K. Most
  10121.  programs fit easily into this model.
  10122.  
  10123.  Because programs compiled within the QuickC environment use the small memory
  10124.  model by default, you should give the /AS option in cases where you use the
  10125.  QCL command to compile a module for use within the QuickC environment.
  10126.  
  10127.  By default, both code and data items in small-model programs are accessed
  10128.  with near addresses. This makes small-model programs faster than those using
  10129.  the memory models described in the following sections. You can override the
  10130.  defaults by using the _far or _huge keyword for data or by using the _far
  10131.  keyword for code.
  10132.  
  10133.  The QCL command and the compiler in the QuickC environment create
  10134.  small-model programs automatically if you do not specify a memory model. The
  10135.  /AS option is provided for completeness; you never need to give it
  10136.  explicitly.
  10137.  
  10138.  Figure B.2 illustrates how memory is set up for the small memory model.
  10139.  
  10140.  (This figure may be found in the printed book.)
  10141.  
  10142.  
  10143.  B.2.3  Creating Medium-Model Programs
  10144.  
  10145.  The /AM option provides a single segment for program data and multiple
  10146.  segments for program code. Each source module is given its own code segment.
  10147.  
  10148.  
  10149.  Medium-model programs are typically QuickC programs that have a large number
  10150.  of program statements (more than 64K of code), but a relatively small amount
  10151.  of data (less than 64K). Program code can occupy any amount of space and is
  10152.  given as many segments as needed; total program data cannot be greater than
  10153.  64K.
  10154.  
  10155.  By default, code items in medium-model programs are accessed with far
  10156.  addresses, and data items are accessed with near addresses. You can override
  10157.  the default by using the _far or _huge keyword for data and the _far keyword
  10158.  for code.
  10159.  
  10160.  The medium model provides a useful trade-off between speed and space, since
  10161.  most programs refer more frequently to data items than to code. Figure B.3
  10162.  illustrates how memory is set up for the medium memory model.
  10163.  
  10164.  (This figure may be found in the printed book.)
  10165.  
  10166.  
  10167.  B.2.4  Creating Compact-Model Programs
  10168.  
  10169.  The /AC option directs the compiler to allow multiple segments for program
  10170.  data but only one segment for the program code.
  10171.  
  10172.  Compact-model programs are typically QuickC programs that have a large
  10173.  amount of data but a relatively small number of program statements. Program
  10174.  data can occupy any amount of space and are given as many segments as
  10175.  needed.
  10176.  
  10177.  By default, code items in compact-model programs are accessed with near
  10178.  addresses, and data items are accessed with far addresses. You can override
  10179.  the defaults by using the _near or _huge keyword for data or by using the
  10180.  _far keyword for code.
  10181.  
  10182.  In the medium and compact models, NULL must be used carefully in certain
  10183.  situations. NULL actually represents a null data pointer. In the small,
  10184.  large, and huge memory models, where code and data pointers are the same
  10185.  size, it can be used with either. This is not the case, however, in medium
  10186.  and compact memory models, where code and data pointers are different sizes.
  10187.  Consider the following example:
  10188.  
  10189.    void func1(char *dp)
  10190.    {
  10191.    .
  10192.    .
  10193.    .
  10194.    }
  10195.  
  10196.    void func2(char (*fp)(void))
  10197.    {
  10198.    .
  10199.    .
  10200.    .
  10201.    }
  10202.  
  10203.    main()
  10204.    {
  10205.    func1(NULL);
  10206.    func2(NULL);
  10207.    }
  10208.  
  10209.  This example passes a 16-bit pointer to both  func1  and  func2  if compiled
  10210.  using the medium model, and a 32-bit pointer to both  func1  and  func2  if
  10211.  compiled using the compact model. To override this behavior, add prototypes
  10212.  to the beginning of the program to indicate the types, or use an explicit
  10213.  cast on the argument to  func1  (compact model) or  func2  (medium model).
  10214.  
  10215.  Figure B.4 illustrates how memory is set up for the compact memory model.
  10216.  
  10217.  (This figure may be found in the printed book.)
  10218.  
  10219.  
  10220.  B.2.5  Creating Large-Model Programs
  10221.  
  10222.  The /AL option allows the compiler to create multiple segments, as needed,
  10223.  for both code and data. No one data item, however, can exceed 64K.
  10224.  
  10225.  Large-model programs are typically very large C programs that use a large
  10226.  amount of data storage during normal processing.
  10227.  
  10228.  By default, both code and data items in large-model programs are accessed
  10229.  with far addresses. You can override the defaults by using the _near or
  10230.  _huge keyword for data or by using the _near keyword for code.
  10231.  
  10232.  Figure B.5 illustrates how memory is set up for the large and huge memory
  10233.  models.
  10234.  
  10235.  (This figure may be found in the printed book.)
  10236.  
  10237.  
  10238.  B.2.6  Creating Huge-Model Programs
  10239.  
  10240.  The /AH option is similar to the /AL option, except that the restriction on
  10241.  the size of individual data items is removed for arrays.
  10242.  
  10243.   Restrictions
  10244.  
  10245.  Some size restrictions do apply to elements of huge arrays where the array
  10246.  is larger than 64K. To provide efficient addressing, array elements are not
  10247.  permitted to cross segment boundaries. This has the following implications:
  10248.  
  10249.  
  10250.  
  10251.    ■   No array element can be larger than 64K. For instance, this might
  10252.        occur when an array has elements that are structures or arrays.
  10253.  
  10254.    ■   For any array larger than 128K, all elements must have a size in bytes
  10255.        equal to a power of 2 (that is, 2 bytes, 4 bytes, 8 bytes, 16 bytes,
  10256.        and so on). If the array is 128K or smaller, however, its elements may
  10257.        be any size, up to and including 64K.
  10258.  
  10259.  
  10260.   Pointer subtraction
  10261.  
  10262.  In huge-model programs, care must be taken when using the sizeof operator or
  10263.  when subtracting pointers. The C language defines the value returned by the
  10264.  sizeof operator to be an unsigned int value, but the size in bytes of a huge
  10265.  array is an unsigned long value. To solve this discrepancy, the QuickC
  10266.  compiler produces the correct size of a huge array when a type cast like the
  10267.  following is used:
  10268.  
  10269.    (unsigned long)sizeof(huge_item)
  10270.  
  10271.  Similarly, the C language defines the result of subtracting two pointers as
  10272.  an int value. When subtracting two huge pointers, however, the result may be
  10273.  a long int value. The QuickC compiler gives the correct result when a type
  10274.  cast like the following is used:
  10275.  
  10276.    (long)(huge_ptr1 - huge_ptr2)
  10277.  
  10278.  
  10279.  B.3  Using the _near, _far, and _huge Keywords
  10280.  
  10281.  One limitation of the predefined memory-model structure is that when you
  10282.  change memory models, all data and code address sizes are subject to change.
  10283.  The QuickC compiler, however, lets you override the default addressing
  10284.  convention for a given memory model and access items with a near, far, or
  10285.  huge pointer. This is done with the _near, _far, and _huge keywords. These
  10286.  special type
  10287.  
  10288.  modifiers can be used with a standard memory model to overcome addressing
  10289.  limitations for particular data or code items, or to optimize access to
  10290.  these items without changing the addressing conventions for the program as a
  10291.  whole. Table B.1 explains how the use of these keywords affects the
  10292.  addressing of code or data, or pointers to code or data.
  10293.  
  10294.  Table B.1  Addressing of Code and Data Declared with _near and
  10295.  
  10296. ╓┌────────┌──────────────────────────┌──────────────────────────┌────────────╖
  10297.  Keyword  Pointer Data               Function                   Arithmetic
  10298.  ────────────────────────────────────────────────────────────────────────────
  10299.  _near    Resides in default data    Assumed to be in current   16 bits
  10300.           segment; referenced with   code segment; referenced
  10301.           16-bit addresses           with 16-bit addresses
  10302.           (pointers to data are 16   (pointers to functions
  10303.           bits)                      are 16 bits)
  10304.  
  10305.  _far     May be anywhere in         Not assumed to be in       16 bits
  10306.           memory─not assumed to      current code segment;
  10307.           reside in current data     referenced with 32-bit
  10308.           segment; referenced with   address (pointers to
  10309.           32-bit addresses           functions are 32 bits)
  10310.           (pointers to data are 32
  10311.           bits)
  10312.  
  10313.  Keyword  Pointer Data               Function                   Arithmetic
  10314.  ────────────────────────────────────────────────────────────────────────────
  10315. 
  10316.  _huge    May be anywhere in         Not applicable to code     32 bits
  10317.           memory─not assumed to
  10318.           reside in current data
  10319.           segment; individual data
  10320.           items (arrays) can exceed
  10321.           64K in size; referenced
  10322.           with 32-bit addresses
  10323.           (pointers to data are 32
  10324.           bits)
  10325.  
  10326.  ────────────────────────────────────────────────────────────────────────────
  10327.  
  10328.  
  10329.  
  10330.  ────────────────────────────────────────────────────────────────────────────
  10331.  NOTE
  10332.  The _near, _far, and _huge keywords are not a standard part of the C
  10333.  language; they are meaningful only for systems that use a segmented
  10334.  architecture similar to that of the 8086 microprocessors. Keep this in mind
  10335.  if you want your code to be ported to other systems.
  10336.  ────────────────────────────────────────────────────────────────────────────
  10337.  
  10338.  In the Microsoft QuickC compiler, the words _near, _far, and _huge are C
  10339.  keywords by default. To treat these keywords as ordinary identifiers, you
  10340.  must do one of the following:
  10341.  
  10342.  
  10343.    ■   For programs compiled within the QuickC environment, compile with the
  10344.        MS Extensions option turned off.
  10345.  
  10346.    ■   For programs compiled with the QCL command, give the /Za option at
  10347.        compile time.
  10348.  
  10349.  
  10350.  These options are useful if you are compiling programs with compilers in
  10351.  which _near, _far, and _huge are not keywords─for instance, if you are
  10352.  porting a program in which one of these words is used as a label.
  10353.  
  10354.  
  10355.  B.3.1  Library Support for _near, _far, and _huge
  10356.  
  10357.  When using the _near, _far, and _huge keywords to modify addressing
  10358.  conventions for particular items, you can usually use one of the standard
  10359.  libraries (tiny, small, compact, medium, large, or huge) with your program.
  10360.  The large-model libraries are also appropriate for use with huge-model
  10361.  programs. However, you must use care when calling library routines. In
  10362.  general, you cannot pass far pointers, or the addresses of far data items,
  10363.  to a small-model library routine. (Some exceptions to this statement are the
  10364.  library routines halloc and hfree, and the printf family of functions.) Of
  10365.  course, you can always pass the value of a far item to a small-model library
  10366.  routine, as shown in the following example:
  10367.  
  10368.    long _far time_val;
  10369.  
  10370.    time(&time_val);  /* Illegal */
  10371.    printf("%ld\n", time_val); /* Legal */
  10372.  
  10373.  If you use the _near, _far, or _huge keyword, it is strongly recommended
  10374.  that you use function prototypes with argument-type lists to ensure that all
  10375.  pointer arguments are passed to functions correctly (see Section B.3.4).
  10376.  
  10377.  
  10378.  B.3.2  Declaring Data with _near, _far, and _huge
  10379.  
  10380.  The _near, _far, and _huge keywords modify either objects or pointers to
  10381.  objects. When using them to declare data or code (or pointers to data or
  10382.  code), keep the following rules in mind:
  10383.  
  10384.  
  10385.    ■   The keyword always modifies the object or pointer immediately to its
  10386.        right. In complex declarators, think of the _far keyword and the item
  10387.        immediately to its right as being a single unit. For example, in the
  10388.        declarator
  10389.  
  10390.        char _far* *p;
  10391.  
  10392.  
  10393.        p  is a pointer (whose size depends on the memory model specified) to
  10394.        a far pointer to char.
  10395.  
  10396.    ■   If the item immediately to the right of the keyword is an identifier,
  10397.        the keyword determines whether the item will be allocated in the
  10398.        default data segment ( _near) or a separate data segment ( _far or
  10399.        _huge). For example,
  10400.  
  10401.        char _near a;
  10402.  
  10403.  
  10404.        allocates  a  as an item of type char with a near address.
  10405.  
  10406.    ■   If the item immediately to the right of the keyword is a pointer, the
  10407.        keyword determines whether the pointer will hold a near address (16
  10408.        bits), a far address (32 bits), or a huge address (also 32 bits). For
  10409.        example,
  10410.  
  10411.        char _far *p;
  10412.  
  10413.  
  10414.        allocates  p  as a far pointer (32 bits) to an item of type char.
  10415.  
  10416.  
  10417.  
  10418.  Examples
  10419.  
  10420.  The examples in this section show data declarations using the _near, _far,
  10421.  and _huge keywords.
  10422.  
  10423.    char a[3000];    /* small-model program */
  10424.    char _far b[30000];
  10425.  
  10426.  The first declaration in the example above allocates the array  a  in the
  10427.  default data segment. By contrast, the array  b  in the second declaration
  10428.  may be allocated in any far data segment. Since these declarations appear in
  10429.  a small-model program, array  a  probably represents frequently used data
  10430.  that were deliberately placed in the default segment for fast access. Array
  10431.  b  probably represents seldom used data that might make the default data
  10432.  segment exceed 64K and force the programmer to use a larger memory model if
  10433.  the array were not declared with the _far keyword. The second declaration
  10434.  uses a large array because it is more likely that a programmer would want to
  10435.  specify the address-allocation size for items of substantial size.
  10436.  
  10437.    char a[3000];    /* large-model program */
  10438.    char _near b[3000];
  10439.  
  10440.  In the example above, access speed would probably not be critical for array
  10441.  a. Even though it may or may not be allocated within the default data
  10442.  segment, it is always referenced with a 32-bit address. Array  b  is
  10443.  explicitly allocated within the default data segment to improve speed of
  10444.  access in this memory model (large).
  10445.  
  10446.    char _huge a[100000];  /* illegal in QuickC */
  10447.    extern char huge a[];
  10448.  
  10449.  Both declarations in the example above are illegal. QuickC does not support
  10450.  static huge data.
  10451.  
  10452.    char _huge *hp;   /* small-model program */
  10453.  
  10454.    hp = halloc(100000,1);
  10455.    hp[0] = 'a';
  10456.  
  10457.  In the small-model program above,  hp  is declared as a pointer to huge
  10458.  data. Any pointer arithmetic for  hp  (such as  hp++) would be performed
  10459.  using 32-bit arithmetic. You can simulate a huge array through the pointer
  10460.  hp  by using the huge data allocation function halloc.
  10461.  
  10462.    char *pa;    /* small-model program */
  10463.    char _far *pb;
  10464.  
  10465.  The pointer  pa  is declared as a near pointer to an item of type char in
  10466.  the example above. The pointer is near by default since the example appears
  10467.  in a small-model program. By contrast,  pb  is allocated as a far pointer to
  10468.  an item of type char;  pb  could be used to point to, and step through, an
  10469.  array of characters stored in a segment other than the default data segment.
  10470.  For example,  pa  might be used to point to array  a  in the first example,
  10471.  while  pb  might be used to point to array  b.
  10472.  
  10473.    char _far * *pa;    /* small-model program */
  10474.    char _far * *pa;    /* large-model program */
  10475.  
  10476.  The pointer declarations in the example above illustrate the interaction
  10477.  between the memory model chosen and the _near, _far, and _huge keywords.
  10478.  Although the declarations for  pa  are identical, in a small-model program
  10479.  pa  is declared as a near pointer to an array of far pointers to type char,
  10480.  while in a large-model program,  pa  is declared as a far pointer to an
  10481.  array of far pointers to type char.
  10482.  
  10483.    char _far * _near *pb;   /* any model */
  10484.    char _far * _far *pb;
  10485.  
  10486.  In the first declaration in this final example,  pb  is declared as a near
  10487.  pointer to an array of far pointers to type char; in the second declaration,
  10488.   pb  is declared as a far pointer to an array of far pointers to type char.
  10489.  Note that, in this example, the _far and _near keywords override the
  10490.  model-specific addressing conventions shown in the fifth example; the
  10491.  declarations for  pb  would have the same effect, regardless of the memory
  10492.  model.
  10493.  
  10494.  
  10495.  B.3.3  Declaring Functions with the _near and _far Keywords
  10496.  
  10497.  The rules for using the _near, _far, and _huge keywords for functions are
  10498.  similar to those for using them with data, as listed below:
  10499.  
  10500.  
  10501.    ■   The keyword always modifies the function or pointer immediately to its
  10502.        right. See Chapter 2, "Functions," of C for Yourself, for more
  10503.        information about rules for evaluating complex declarations.
  10504.  
  10505.    ■   If the item immediately to the right of the keyword is a function,
  10506.        then the keyword determines whether the function will be allocated as
  10507.        near or far. For example,
  10508.  
  10509.        char _far fun( );
  10510.  
  10511.  
  10512.        defines  fun  as a function called with a 32-bit address and returning
  10513.        type char.
  10514.  
  10515.    ■   If the item immediately to the right of the keyword is a pointer to a
  10516.        function, then the keyword determines whether the function will be
  10517.        called using a near (16-bit) or far (32-bit) address. For example,
  10518.  
  10519.        char (_far * pfun)( );
  10520.  
  10521.  
  10522.        defines  pfun  as a far pointer (32 bits) to a function returning type
  10523.        char.
  10524.  
  10525.    ■   Function declarations must match function definitions.
  10526.  
  10527.    ■   The _huge keyword cannot be applied to functions.
  10528.  
  10529.  
  10530.  
  10531.  Examples
  10532.  
  10533.    void char _far fun(void);            /* small model */
  10534.    void char _far fun(void)
  10535.            {
  10536.            .
  10537.            .
  10538.            .
  10539.            }
  10540.  
  10541.  In the example above,  fun  is declared as a function returning type char.
  10542.  The _far keyword in the declaration means that  fun  must be called with a
  10543.  32-bit call.
  10544.  
  10545.    static char _far * _near fun( );      /* large model */
  10546.    static char _far * _near fun( )
  10547.            {
  10548.            .
  10549.            .
  10550.            .
  10551.            }
  10552.  
  10553.  In the large-model example above,  fun  is declared as a near function that
  10554.  returns a far pointer to type char. Such a function might be seen in a
  10555.  large-model program as a helper routine that is used frequently, but only by
  10556.  the routines in its own module. Because all routines in a given module share
  10557.  the same code segment, the function could always be accessed with a near
  10558.  call. However, you could not pass a pointer to  fun  as an argument to
  10559.  another function outside the module in which  fun  was declared.
  10560.  
  10561.    void _far *fun(void);               /* small model */
  10562.    void (_far * pfun) ( ) = fun;
  10563.  
  10564.  The small-model example above declares  pfun  as a far pointer to a function
  10565.  that has return type void, and then assigns the address of  fun  to  pfun.
  10566.  In fact, pfun  could be used to point to any function accessed with a far
  10567.  call. Note that if the function pointed to by  pfun  has not been declared
  10568.  with the _far keyword, or if it is not far by default, then calling that
  10569.  function through  pfun  would cause the program to fail.
  10570.  
  10571.    double _far * (_far fun)( );      /* compact model */
  10572.    double _far * (_far *pfun)( ) = fun;
  10573.  
  10574.  The final example above declares  pfun  as a far pointer to a function that
  10575.  returns a far pointer to type double, and then assigns the address of  fun
  10576.  to  pfun. This might be used in a compact-model program for a function that
  10577.  is not used frequently and thus does not need to be in the default code
  10578.  segment. Both the function and the pointer to the function must be declared
  10579.  with the _far keyword.
  10580.  
  10581.  
  10582.  B.3.4  Pointer Conversions
  10583.  
  10584.  Passing pointers as arguments to functions may cause automatic conversions
  10585.  in the size of the pointer argument because passing a pointer to a function
  10586.  forces the pointer size to the larger of the following two sizes:
  10587.  
  10588.  
  10589.    1.  The default pointer size for that type, as defined by the memory model
  10590.        used during compilation.
  10591.  
  10592.        For example, in medium-model programs, data pointer arguments are near
  10593.        by default and code pointer arguments are far by default.
  10594.  
  10595.    2.  The type of the argument.
  10596.  
  10597.  
  10598.  If a function prototype with argument types is given, the compiler performs
  10599.  type checking and enforces the conversion of actual arguments to the
  10600.  declared type of the corresponding formal argument. However, if no
  10601.  declaration is present or the argument-type list is empty, the compiler
  10602.  converts pointer arguments automatically to either the default type or the
  10603.  type of the argument, whichever is largest. To avoid mismatched arguments,
  10604.  you should always use a prototype with the argument types.
  10605.  
  10606.  
  10607.  Examples
  10608.  
  10609.    /* This program produces unexpected results in compact-,
  10610.    ** large-, or huge-model programs.
  10611.    */
  10612.  
  10613.    main( )
  10614.  
  10615.     {
  10616.     int _near *x;
  10617.     char _far *y;
  10618.     int z = 1;
  10619.  
  10620.     test_fun(x, y, z);   /*x coerced to far pointer*/
  10621.  
  10622.     }
  10623.  
  10624.    int test_fun(ptr1, ptr2, a)
  10625.     int _near *ptr1;
  10626.     char _far *ptr2;
  10627.     int a;
  10628.  
  10629.     {
  10630.     printf("Value of a = %d\n", a);
  10631.     }
  10632.  
  10633.  If the preceding example is compiled as a small-model program (default for
  10634.  QCL) or medium-model program (with the /AM option on the QCL command line),
  10635.  the size of pointer argument  x  is 16 bits, the size of pointer argument  y
  10636.   is 32 bits, and the value printed for  a  is 1. However, if the preceding
  10637.  example is compiled with the /AC, /AL, or /AH option, both  x  and  y  are
  10638.  automatically converted to far pointers when they are passed to  test_fun.
  10639.  Because  ptr1, the first parameter of  test_fun, is defined as a
  10640.  near-pointer argument, it takes only 16 bits of the 32 bits passed to it.
  10641.  
  10642.  The next parameter,  ptr2, takes the remaining 16 bits passed to  ptr1, plus
  10643.  16 bits of the 32 bits passed to it. Finally, the third parameter,  a, takes
  10644.  the leftover 16 bits from  ptr2, instead of the value of  z  in the  main
  10645.  function. This shifting process does not generate an error message because
  10646.  both the function call and the function definition are legal; in this case,
  10647.  the program does not work as intended because the value assigned to  a  is
  10648.  not the value intended.
  10649.  
  10650.  To pass  ptr1  as a near pointer, you should include a forward declaration
  10651.  that specifically declares this argument for  test_fun  as a near pointer,
  10652.  as shown below:
  10653.  
  10654.    /* First, declare test_fun so the compiler knows in advance
  10655.    ** about the near pointer argument:
  10656.    */
  10657.    int test_fun(int _near*, char _far *, int);
  10658.  
  10659.  
  10660.    main( )
  10661.  
  10662.     {
  10663.     int _near *x;
  10664.     char _far *y;
  10665.     int z = 1;
  10666.  
  10667.     test_fun(x, y, z);   /* now, x will not be coerced
  10668.            ** to a far pointer; it will be
  10669.            ** passed as a near pointer,
  10670.            ** no matter what memory
  10671.            ** model is used
  10672.            */
  10673.     }
  10674.  
  10675.    int test_fun(ptr1, ptr2, a)
  10676.     int _near *ptr1;
  10677.     char _far *ptr2;
  10678.     int a;
  10679.  
  10680.     {
  10681.     printf("Value of a = %d\n", a);
  10682.     }
  10683.  
  10684.  Note that it would not be sufficient to reverse the definition order for
  10685.  test_fun  and  main  in the first example to avoid pointer coercions; the
  10686.  pointer arguments must be declared in a forward declaration, as in the
  10687.  second example.
  10688.  
  10689.  
  10690.  
  10691.  
  10692.  
  10693.  
  10694.  Appendix C  Hardware-Specific Utilities
  10695.  ────────────────────────────────────────────────────────────────────────────
  10696.  
  10697.  This appendix describes three utility programs provided with the Microsoft
  10698.  QuickC Compiler. These utilities support special hardware that some QuickC
  10699.  users may have. The utilities are
  10700.  
  10701.  
  10702.    ■   The FIXSHIFT utility, which fixes a bug associated with some COMPAQ(R)
  10703.        and compatible keyboards
  10704.  
  10705.    ■   The MSHERC driver, which supports the Hercules display adapter
  10706.  
  10707.    ■   The MOUSE driver, which supports the Microsoft mouse
  10708.  
  10709.  
  10710.  
  10711.  C.1  Fixing Keyboard Problems with FIXSHIFT
  10712.  
  10713.  On the keyboards of some COMPAQ and compatible computers, the arrow keys are
  10714.  not part of the numeric keypad. Because of a bug in the ROM BIOS, the QuickC
  10715.  editor (and other software not supplied by Microsoft) may not operate
  10716.  correctly on these machines. The FIXSHIFT utility fixes this bug.
  10717.  
  10718.  To correct the problem, copy FIXSHIFT.COM to the directory that contains the
  10719.  QuickC program files, and type the following command:
  10720.  
  10721.    fixshift
  10722.  
  10723.  Any combination of uppercase and lowercase letters is acceptable for this
  10724.  command. When FIXSHIFT executes, it first prompts you to press the DOWN key
  10725.  to ascertain whether the BIOS has the bug. If not, FIXSHIFT displays a
  10726.  message telling you so, then exits. You need not run FIXSHIFT again. If your
  10727.  machine's BIOS has the bug, FIXSHIFT displays additional prompts that guide
  10728.  you through the appropriate actions.
  10729.  
  10730.  FIXSHIFT requires approximately 450 bytes of memory. It fixes only the BIOS
  10731.  bug and has no effect on other programs that you run. You can include the
  10732.  FIXSHIFT command in your AUTOEXEC.BAT file to correct the problem each time
  10733.  you start the computer.
  10734.  
  10735.  
  10736.  C.2  Using Hercules Graphics
  10737.  
  10738.  This section briefly summarizes the support that Microsoft QuickC provides
  10739.  for the Hercules display adapter. For more information, see your Hercules
  10740.  documentation. Note that the graphics demonstration program GRDEMO.C
  10741.  supports Hercules graphics.
  10742.  
  10743.  
  10744.  C.2.1  Support for Cards and Display Characteristics
  10745.  
  10746.  QuickC supports the Hercules Graphics Card, Graphics Card Plus, InColor
  10747.  Card, and other cards that are 100 percent compatible.
  10748.  
  10749.  Only monochrome text and graphics are supported. In monochrome, the screen
  10750.  resolution is 720 x 348 pixels. The character box is 9 x 14 pixels. Text
  10751.  dimensions are 80 columns by 25 rows, but the bottom two scan lines of the
  10752.  25th row are not visible.
  10753.  
  10754.  
  10755.  C.2.2  The MSHERC Driver
  10756.  
  10757.  MSHERC.COM is the driver for Hercules graphics. You must load the driver
  10758.  before running programs that use Hercules graphics. To load the driver, type
  10759.  the following command:
  10760.  
  10761.    MSHERC
  10762.  
  10763.  To load the driver when you start the machine, put the MSHERC command in
  10764.  your AUTOEXEC.BAT file.
  10765.  
  10766.  If you have both a Hercules monochrome card and a color video card, you
  10767.  should invoke MSHERC.COM with the /H (/HALF) option, as follows:
  10768.  
  10769.    MSHERC /H
  10770.  
  10771.  The /H option causes the driver to use one instead of two graphics pages.
  10772.  This prevents the two video cards from trying to use the same area of
  10773.  memory. You need not use the /H option if you have only a Hercules card.
  10774.  
  10775.  If you are developing a commercial application that uses graphics, you
  10776.  should include MSHERC.COM with your product; you are free to include this
  10777.  file without an explicit licensing agreement.
  10778.  
  10779.  ────────────────────────────────────────────────────────────────────────────
  10780.  NOTE
  10781.  
  10782.  MSHERC.COM is identical to QBHERC.COM, the Hercules driver shipped with
  10783.  Microsoft QuickBASIC version 4.0, and the Microsoft BASIC Compiler version
  10784.  6.0.
  10785.  ────────────────────────────────────────────────────────────────────────────
  10786.  
  10787.  
  10788.  C.2.3  Using a Mouse
  10789.  
  10790.  To use a mouse with the Hercules adapter, follow the special instructions
  10791.  for Hercules cards in the Microsoft Mouse Programmer's Reference Guide.
  10792.  (This manual must be ordered separately; it is not supplied with either
  10793.  Microsoft QuickC or the Microsoft Mouse package.)
  10794.  
  10795.  
  10796.  C.2.4  Setting Hercules Graphics Mode
  10797.  
  10798.  The graphics include file GRAPH.H sets manifest constants needed for
  10799.  Hercules graphics operation. In GRAPH.H, the constant _HERCMONO sets the
  10800.  video mode to 720 x 348 pixels in monochrome. GRAPH.H also includes the
  10801.  constant _HGC in the section labeled "videoconfig adapter values."
  10802.  
  10803.  
  10804.  C.3  The Mouse Driver
  10805.  
  10806.  The Microsoft Mouse is optional software and is not required for QuickC. If
  10807.  you use the mouse, however, you must have version 6.10 or later of the
  10808.  MOUSE.COM driver; otherwise, QuickC will not operate correctly. If you have
  10809.  an earlier release, you need to use the MOUSE.COM driver provided with
  10810.  QuickC. See your Microsoft Mouse manual for installation instructions. If
  10811.  you update the driver, be sure to delete any outdated MOUSE.SYS drivers from
  10812.  your CONFIG.SYS file.
  10813.  
  10814.  
  10815.  
  10816.  
  10817.  2094
  10818.  
  10819.  
  10820.  
  10821.  Appendix D  Error Messages
  10822.  ────────────────────────────────────────────────────────────────────────────
  10823.  
  10824.  This appendix lists error messages you may encounter as you develop a
  10825.  program and gives a brief description of actions you can take to correct the
  10826.  errors. The following list tells where to find error messages for the
  10827.  various components of the Microsoft QuickC Compiler:
  10828.  
  10829.  Component                         Section
  10830.  ────────────────────────────────────────────────────────────────────────────
  10831.  The Microsoft QuickC Compiler     "Compiler Errors"
  10832.  
  10833.  The command line used to invoke   "Command-Line Errors"
  10834.  the Microsoft QuickC Compiler
  10835.  
  10836.  The Microsoft C                   "Run-Time Errors"
  10837.  run-time libraries
  10838.  and other run-time situations
  10839.  
  10840.  The Microsoft QuickC linker,      "QLINK Error Messages"
  10841.  QLINK
  10842.  
  10843.  The Microsoft Library Manager,    "LIB Error Messages"
  10844.  LIB
  10845.  
  10846.  The Microsoft                     "NMAKE Error Messages"
  10847.  Program-Maintenance Utility,
  10848.  NMAKE
  10849.  
  10850.  Note that the compiler, command-line, and run-time error messages are listed
  10851.  alphabetically by category in this appendix.
  10852.  
  10853.  See "Compiler Limits" in the "Compiler Errors" section for information about
  10854.  compiler limits; see "Run-Time Limits" in the "Run-Time Errors" section for
  10855.  information about run-time limits.
  10856.  
  10857.  
  10858.  D.1  Compiler Errors
  10859.  
  10860.  The error messages produced by the QuickC Compiler fall into three
  10861.  categories:
  10862.  
  10863.  
  10864.    1.  Fatal error messages
  10865.  
  10866.    2.  Compilation error messages
  10867.  
  10868.    3.  Warning messages
  10869.  
  10870.  
  10871.  The messages for each category are listed below in numerical order, with a
  10872.  brief explanation of each error. To look up an error message, first
  10873.  determine the message category, then find the error number. Each message
  10874.  that is generated within the QuickC environment appears in the error window;
  10875.  QuickC moves the cursor to the line that caused the error. Each message
  10876.  generated by compiling with the QCL command gives the file name and line
  10877.  number where the error occurs.
  10878.  
  10879.  
  10880.  Fatal Error Messages
  10881.  
  10882.  Fatal error messages indicate a severe problem, one that prevents the
  10883.  compiler from processing your program any further. These messages have the
  10884.  following format:
  10885.  
  10886.  filename(line) : fatal error C1xxx : messagetext
  10887.  
  10888.  After the compiler displays a fatal error message, it terminates without
  10889.  producing an object file or checking for further errors.
  10890.  
  10891.  
  10892.  Compilation Error Messages
  10893.  
  10894.  Compilation error messages identify actual program errors. These messages
  10895.  appear in the following format:
  10896.  
  10897.  filename(line) : error C2xxx : messagetext
  10898.  
  10899.  The compiler does not produce an object file for a source file that has
  10900.  compilation errors in the program. When the compiler encounters such errors,
  10901.  it attempts to recover from the error. If possible, it continues to process
  10902.  the source file and produce error messages. If errors are too numerous or
  10903.  too severe, the compiler stops processing.
  10904.  
  10905.  
  10906.  Warning Messages
  10907.  
  10908.  Warning messages are informational only; they do not prevent compilation or
  10909.  linking. These messages appear in the following format:
  10910.  
  10911.  filename(line) : warning C4xxx : messagetext
  10912.  
  10913.  You can use the /W option to control the level of warnings that the compiler
  10914.  generates.
  10915.  
  10916.  
  10917.  D.1.1  Fatal Error Messages
  10918.  
  10919.  The following messages identify fatal errors. The compiler cannot recover
  10920.  from a fatal error; it terminates after displaying the error message.
  10921.  
  10922.  Number                            Fatal Error Message
  10923.  ────────────────────────────────────────────────────────────────────────────
  10924.  C1000                             UNKNOWN FATAL ERROR Contact Microsoft
  10925.                                    Product Support Services
  10926.  
  10927.                                    An unknown error condition was detected
  10928.                                    by the compiler.
  10929.  
  10930.                                    Note the circumstances of the error and
  10931.                                    notify Microsoft Corporation by
  10932.                                    following the instructions in the
  10933.                                    Microsoft Product Assistance Request
  10934.                                    form at the back of C for Yourself,
  10935.                                    included in the QuickC version 2.5
  10936.                                    package.
  10937.  
  10938.  C1001                             Internal Compiler Error (compiler file '
  10939.                                    filename', line n) Contact Microsoft
  10940.                                    Product Support Services
  10941.  
  10942.                                    The compiler detected an internal
  10943.                                    inconsistency.
  10944.  
  10945.                                    Note the circumstances of the error and
  10946.                                    notify Microsoft Corporation by
  10947.                                    following the instructions in the
  10948.                                    Microsoft Product Assistance Request
  10949.                                    form at the back of C for Yourself,
  10950.                                    included in the QuickC version 2.5
  10951.                                    package. Note the file name and line
  10952.                                    number where the error occurred; an
  10953.                                    internal file and line number are
  10954.                                    provided in addition to the file and
  10955.                                    line number of your source file.
  10956.  
  10957.  C1002                             compiler is out of heap space in Pass 2
  10958.  
  10959.                                    The compiler ran out of dynamic memory
  10960.                                    space. Usually this means the program
  10961.                                    has too many symbols and/or complex
  10962.                                    expressions.
  10963.  
  10964.                                    One of the following may be a solution:
  10965.  
  10966.                                    ■ Divide the file into several smaller
  10967.                                    source files.
  10968.  
  10969.                                    ■ Break expressions into smaller
  10970.                                    subexpressions.
  10971.  
  10972.                                    ■ Remove other programs or drivers
  10973.                                    running in the system which could be
  10974.                                    consuming significant amounts of memory.
  10975.  
  10976.                                    ■ Compile without using NMAKE.
  10977.  
  10978.  C1003                             error count exceeds n; stopping
  10979.                                    compilation
  10980.  
  10981.                                    Errors in the program were too numerous
  10982.                                    or too severe to allow recovery, and the
  10983.                                    compiler must terminate.
  10984.  
  10985.  Number                            Fatal Error Message
  10986.  ────────────────────────────────────────────────────────────────────────────
  10987.  C1004                             unexpected end-of-file found
  10988.  
  10989.                                    The default disk drive did not contain
  10990.                                    sufficient space for the compiler to
  10991.                                    create temporary files. The space
  10992.                                    required is approximately two times the
  10993.                                    size of the source file.
  10994.  
  10995.                                    This message also appears when the #if
  10996.                                    directive occurs without a corresponding
  10997.                                    closing #endif directive while the #if
  10998.                                    test directs the compiler to skip the
  10999.                                    section.
  11000.  
  11001.  C1005                             string too big for buffer
  11002.  
  11003.                                    A string in a compiler intermediate file
  11004.                                    overflowed a buffer.
  11005.  
  11006.  C1006                             write error on compiler intermediate
  11007.                                    file
  11008.  
  11009.                                    The compiler was unable to create the
  11010.                                    intermediate files used in the
  11011.                                    compilation process.
  11012.  
  11013.  C1007                             unrecognized flag 'string' in 'option'
  11014.  
  11015.                                    The string in the command-line option
  11016.                                    was not a valid option.
  11017.  
  11018.  C1008                             no input file specified
  11019.  
  11020.                                    The compiler was not given a file to
  11021.                                    compile.
  11022.  
  11023.  C1009                             compiler limit : macros nested too
  11024.                                    deeply
  11025.  
  11026.                                    Too many macros were being expanded at
  11027.                                    the same time.
  11028.  
  11029.                                    This error occurs when a macro
  11030.                                    definition contains macros to be
  11031.                                    expanded and those macros contain other
  11032.                                    macros.
  11033.  
  11034.                                    Try splitting the nested macros into
  11035.                                    simpler macros.
  11036.  
  11037.  C1010                             compiler limit : macro expansion too big
  11038.  
  11039.                                    The expansion of a macro exceeded the
  11040.                                    available space.
  11041.  
  11042.                                    Produce a preprocessor listing using the
  11043.                                    /P option and check to see if the
  11044.                                    expanded text is too large.
  11045.  
  11046.                                    Try to split up the macros into simpler
  11047.                                    macros, or to remove nonessential space
  11048.                                    and tab characters from macro
  11049.                                    definitions used in the expansion.
  11050.  
  11051.  C1011                             compiler limit : 'identifier' : macro
  11052.                                    definition too big
  11053.  
  11054.                                    The macro definition was longer than
  11055.                                    allowed.
  11056.  
  11057.                                    Split the definition into shorter
  11058.                                    definitions.
  11059.  
  11060.  Number                            Fatal Error Message
  11061.  ────────────────────────────────────────────────────────────────────────────
  11062.  C1012                             unmatched parenthesis nesting - missing
  11063.                                    'character'
  11064.  
  11065.                                    The parentheses in a preprocessor
  11066.                                    directive were not matched. The missing
  11067.                                    character is either a left or right
  11068.                                    parenthesis.
  11069.  
  11070.  C1014                             too many include files
  11071.  
  11072.                                    Nesting of #include directives exceeded
  11073.                                    the 10-level limit.
  11074.  
  11075.                                    Up to 10 open files may be included by
  11076.                                    the use of nested directives. The .C
  11077.                                    file containing the directive is counted
  11078.                                    as one of the files.
  11079.  
  11080.  C1016                             #if[n]def expected an identifier
  11081.  
  11082.                                    An identifier must be specified with the
  11083.                                    #ifdef and #ifndef directives.
  11084.  
  11085.  C1017                             invalid integer constant expression
  11086.  
  11087.                                    The expression in an #if directive
  11088.                                    either did not exist or did not evaluate
  11089.                                    to a constant.
  11090.  
  11091.  C1018                             unexpected '#elif'
  11092.  
  11093.                                    The #elif directive is legal only when
  11094.                                    it appears within an #if, #ifdef, or
  11095.                                    #ifndef construct.
  11096.  
  11097.  C1019                             unexpected '#else'
  11098.  
  11099.                                    The #else directive is legal only when
  11100.                                    it appears within an #if, #ifdef, or
  11101.                                    #ifndef construct.
  11102.  
  11103.  C1020                             unexpected '#endif'
  11104.  
  11105.                                    An #endif directive appeared without a
  11106.                                    matching #if, #ifdef, or #ifndef
  11107.                                    directive.
  11108.  
  11109.  C1021                             invalid preprocessor command 'string'
  11110.  
  11111.                                    The characters following the number sign
  11112.                                    (#) did not form a valid preprocessor
  11113.                                    directive.
  11114.  
  11115.  C1022                             expected '#endif'
  11116.  
  11117.                                    An #if, #ifdef, or #ifndef directive was
  11118.                                    not terminated with an #endif directive.
  11119.  
  11120.  C1023                             cannot open source file 'filename'
  11121.  
  11122.                                    The given file either did not exist,
  11123.                                    could not be opened, or was not found.
  11124.  
  11125.  Number                            Fatal Error Message
  11126.  ────────────────────────────────────────────────────────────────────────────
  11127.  C1023                             (continued)
  11128.  
  11129.                                    Make sure the environment settings are
  11130.                                    valid and that the correct path name for
  11131.                                    the file is specified.
  11132.  
  11133.                                    If this error appears without an error
  11134.                                    message, the compiler has run out of
  11135.                                    file handles. Increase the number of
  11136.                                    file handles by changing the FILES
  11137.                                    setting in CONFIG.SYS to allow a larger
  11138.                                    number of open files. FILES=20 is the
  11139.                                    recommended setting.
  11140.  
  11141.  C1024                             cannot open include file 'filename'
  11142.  
  11143.                                    The specified file in an #include
  11144.                                    preprocessor directive could not be
  11145.                                    found.
  11146.  
  11147.                                    Make sure settings for the INCLUDE and
  11148.                                    TMP environment variables are valid and
  11149.                                    that the correct path name for the file
  11150.                                    is specified.
  11151.  
  11152.                                    If this error appears without an error
  11153.                                    message, the compiler has run out of
  11154.                                    file handles. Increase the number of
  11155.                                    file handles by changing the FILES
  11156.                                    setting in CONFIG.SYS to allow a larger
  11157.                                    number of open files. FILES=20 is the
  11158.                                    recommended setting.
  11159.  
  11160.  C1025                             compiler terminated by user
  11161.  
  11162.                                    The compiler was stopped by the user.
  11163.  
  11164.  C1026                             parser stack overflow, please simplify
  11165.                                    your program
  11166.  
  11167.                                    The program cannot be processed because
  11168.                                    the space required to parse the program
  11169.                                    causes a stack overflow in the compiler.
  11170.  
  11171.                                    Simplify the program by decreasing the
  11172.                                    complexity of expressions. Decrease the
  11173.                                    level of nesting in for and switch
  11174.                                    statements by putting some of the more
  11175.                                    deeply nested statements in separate
  11176.                                    functions. Break up very long
  11177.                                    expressions involving ',' operators or
  11178.                                    function calls.
  11179.  
  11180.  C1027                             DGROUP data allocation exceeds 64K
  11181.  
  11182.                                    More than 64K of variables were
  11183.                                    allocated to the default data segment.
  11184.  
  11185.                                    For compact-, large-, or huge-model
  11186.                                    programs, compile with the QCL command
  11187.                                    and use the /Gt option to move items
  11188.                                    into separate segments. In tiny-, small-
  11189.                                    or medium-model programs, consider
  11190.                                    explicitly allocating some variables
  11191.                                    outside of DGROUP by using _based or
  11192.                                    _far.
  11193.  
  11194.  C1028                             'segment' : segment allocation exceeds
  11195.                                    64K
  11196.  
  11197.                                    More than 64K of far data were allocated
  11198.                                    to the given segment. A single module
  11199.                                    can have only 64K of far data.
  11200.  
  11201.  Number                            Fatal Error Message
  11202.  ────────────────────────────────────────────────────────────────────────────
  11203.  C1028                             (continued)
  11204.  
  11205.                                    There are several ways to correct this
  11206.                                    situation:
  11207.  
  11208.                                    ■ Break the declarations into separate
  11209.                                    modules.
  11210.  
  11211.                                    ■ Reduce the amount of data used by the
  11212.                                    program.
  11213.  
  11214.                                    ■ Compile the program with the Microsoft
  11215.                                    C Optimizing Compiler.
  11216.  
  11217.  C1031                             compiler limit : function calls nested
  11218.                                    too deeply
  11219.  
  11220.                                    The program exceeded the dynamic
  11221.                                    compiler limit on nested function calls.
  11222.                                    Split the nested call, saving the return
  11223.                                    value from one of the nested functions
  11224.                                    in a temporary variable.
  11225.  
  11226.  C1032                             cannot open object listing file '
  11227.                                    filename'
  11228.  
  11229.                                    There are several possible causes for
  11230.                                    this error:
  11231.  
  11232.                                    ■ The given name is not valid.
  11233.  
  11234.                                    ■ The file cannot be opened for lack of
  11235.                                    space.
  11236.  
  11237.                                    ■ A read-only file with the given name
  11238.                                    already exists.
  11239.  
  11240.  C1033                             cannot open assembly language output
  11241.                                    file 'filename'
  11242.  
  11243.                                    There are several possible causes for
  11244.                                    this error:
  11245.  
  11246.                                    ■ The given name is not valid.
  11247.  
  11248.                                    ■ The file cannot be opened for lack of
  11249.                                    space.
  11250.  
  11251.                                    ■ A read-only file with the given name
  11252.                                    already exists.
  11253.  
  11254.  C1035                             expression too complex, please simplify
  11255.  
  11256.                                    The compiler was unable to generate code
  11257.                                    for a complex expression. Break the
  11258.                                    expression into simpler subexpressions
  11259.                                    and recompile.
  11260.  
  11261.  C1036                             cannot open source listing file '
  11262.                                    filename'
  11263.  
  11264.                                    There are several possible causes for
  11265.                                    this error:
  11266.  
  11267.                                    ■ The given name is not valid.
  11268.  
  11269.                                    ■ The file cannot be opened for lack of
  11270.                                    space.
  11271.  
  11272.                                    ■ A read-only file with the given name
  11273.                                    already exists.
  11274.  
  11275.  Number                            Fatal Error Message
  11276.  ────────────────────────────────────────────────────────────────────────────
  11277.  C1037                             cannot open object file 'filename'
  11278.  
  11279.                                    There are several possible causes for
  11280.                                    this error:
  11281.  
  11282.                                    ■ The given name is not valid.
  11283.  
  11284.                                    ■ The file cannot be opened for lack of
  11285.                                    space.
  11286.  
  11287.                                    ■ A read-only file with the given name
  11288.                                    already exists.
  11289.  
  11290.  C1039                             unrecoverable heap overflow in Pass 3
  11291.  
  11292.                                    The post-optimizer compiler pass
  11293.                                    overflowed the heap and could not
  11294.                                    continue.
  11295.  
  11296.                                    One of the following may be a solution:
  11297.  
  11298.                                    ■ Break up the function containing the
  11299.                                    line that caused the error.
  11300.  
  11301.                                    ■ Recompile with the /Od option,
  11302.                                    removing optimization.
  11303.  
  11304.                                    ■ Remove other programs or drivers
  11305.                                    running in the system which could be
  11306.                                    consuming significant amounts of memory.
  11307.  
  11308.                                    ■ Compile without using NMAKE.
  11309.  
  11310.  C1040                             unexpected end-of-file in source file '
  11311.                                    filename'
  11312.  
  11313.                                    The compiler detected an unexpected
  11314.                                    end-of-file condition while creating a
  11315.                                    source listing or mingled source/object
  11316.                                    listing.
  11317.  
  11318.  C1041                             cannot open compiler intermediate file -
  11319.                                    no more files
  11320.  
  11321.                                    The compiler could not create
  11322.                                    intermediate files for use in the
  11323.                                    compilation process because no more file
  11324.                                    handles were available.
  11325.  
  11326.                                    Increase the number of file handles by
  11327.                                    changing the FILES setting in your
  11328.                                    CONFIG.SYS file to allow a larger number
  11329.                                    of open files. FILES=20 is the
  11330.                                    recommended setting.
  11331.  
  11332.  C1042                             cannot open compiler intermediate file -
  11333.                                    no such file or directory
  11334.  
  11335.                                    The compiler could not create
  11336.                                    intermediate files for use in the
  11337.                                    compilation process because the TMP
  11338.                                    environment variable was set to an
  11339.                                    invalid directory or path.
  11340.  
  11341.  C1043                             cannot open compiler intermediate file
  11342.  
  11343.                                    The compiler could not create
  11344.                                    intermediate files for use in the
  11345.                                    compilation process. The exact reason
  11346.                                    could not be determined.
  11347.  
  11348.  Number                            Fatal Error Message
  11349.  ────────────────────────────────────────────────────────────────────────────
  11350.  C1043                             (continued)
  11351.  
  11352.                                    One of the following may be a solution:
  11353.  
  11354.                                    ■ Make sure that the environment
  11355.                                    variable TMP points to a drive and
  11356.                                    directory in which a file can be created.
  11357.  
  11358.                                    ■ Delete unneeded files in the TMP
  11359.                                    directory.
  11360.  
  11361.  C1044                             out of disk space for compiler
  11362.                                    intermediate file
  11363.  
  11364.                                    The compiler could not create
  11365.                                    intermediate files for use in the
  11366.                                    compilation process because no more
  11367.                                    space was available.
  11368.  
  11369.                                    Make more space available on the disk
  11370.                                    pointed to by the TMP environment
  11371.                                    variable and then recompile.
  11372.  
  11373.  C1045                             floating point overflow
  11374.  
  11375.                                    The compiler generated a floating-point
  11376.                                    exception while doing constant
  11377.                                    arithmetic on floating-point items at
  11378.                                    compile time, as in the following
  11379.                                    example:
  11380.  
  11381.                                    float fp_val = 1.0e100;
  11382.  
  11383.                                    In this example, the double-precision
  11384.                                    constant  1.0e100  exceeds the maximum
  11385.                                    allowable value for a floating-point
  11386.                                    data item.
  11387.  
  11388.  C1047                             limit of 'option' exceeded at 'string'
  11389.  
  11390.                                    The given option was specified too many
  11391.                                    times. The given string is the argument
  11392.                                    to the option that caused the error.
  11393.  
  11394.                                    If the environment variable CL has been
  11395.                                    set, options in the CL variable are read
  11396.                                    before options specified on the command
  11397.                                    line.
  11398.  
  11399.  C1048                             unknown option 'character' in 'option'
  11400.  
  11401.                                    The given character was not a valid
  11402.                                    letter for the option.
  11403.  
  11404.                                    For example, the line
  11405.  
  11406.                                    #pragma optimize("z", on)
  11407.  
  11408.                                    causes the following error:
  11409.  
  11410.                                    unknown option 'z' in '#pragma optimize'
  11411.  
  11412.  C1049                             invalid numerical argument 'string'
  11413.  
  11414.                                    A numerical argument was expected
  11415.                                    instead of the given string.
  11416.  
  11417.  Number                            Fatal Error Message
  11418.  ────────────────────────────────────────────────────────────────────────────
  11419.  C1050                             'segment' : code segment too large
  11420.  
  11421.                                    A code segment grew to within 36 bytes
  11422.                                    of 64K during compilation.
  11423.  
  11424.                                    A 36-byte pad is used because of a bug
  11425.                                    in some 80286 chips that can cause
  11426.                                    programs to exhibit unusual behavior
  11427.                                    when, among other conditions, the size
  11428.                                    of a code segment is within 36 bytes of
  11429.                                    64K.
  11430.  
  11431.  C1052                             compiler limit : #if/#ifdef nested too
  11432.                                    deeply
  11433.  
  11434.                                    The program exceeded the maximum of 32
  11435.                                    nesting levels for #if and #ifdef
  11436.                                    directives.
  11437.  
  11438.  C1053                             compiler limit : struct/union nested too
  11439.                                    deeply
  11440.  
  11441.                                    A structure or union definition was
  11442.                                    nested to more than 15 levels.
  11443.  
  11444.                                    Break the structure or union into two
  11445.                                    parts by defining one or more of the
  11446.                                    nested structures using typedef.
  11447.  
  11448.  C1054                             compiler limit : initializers nested too
  11449.                                    deeply
  11450.  
  11451.                                    The compiler limit on the nesting of
  11452.                                    initializers was exceeded. The limit
  11453.                                    depends on the combination of types
  11454.                                    being initialized and may range from 10
  11455.                                    to 15 levels.
  11456.  
  11457.                                    Simplify the data type being initialized
  11458.                                    to reduce the levels of nesting, or
  11459.                                    assign initial values in separate
  11460.                                    statements after the declaration.
  11461.  
  11462.  C1055                             compiler limit : out of keys
  11463.  
  11464.                                    The file being compiled contained too
  11465.                                    many symbols.
  11466.  
  11467.                                    Try to separate it into two files that
  11468.                                    can be compiled independently.
  11469.  
  11470.  C1056                             compiler limit : out of macro expansion
  11471.                                    space
  11472.  
  11473.                                    The compiler overflowed an internal
  11474.                                    buffer during the expansion of a macro.
  11475.  
  11476.                                    Simplify the macro and/or shorten its
  11477.                                    text.
  11478.  
  11479.  C1057                             unexpected end-of-file in macro
  11480.                                    expansion (missing ')'?)
  11481.  
  11482.                                    The compiler has encountered the end of
  11483.                                    the source file while gathering the
  11484.                                    arguments of a macro invocation. Usually
  11485.                                    this is the result of a missing closing
  11486.                                    parenthesis on the macro invocation.
  11487.  
  11488.  C1059                             compiler is out of near heap space
  11489.  
  11490.                                    The compiler ran out of storage for
  11491.                                    items that it stores in the "near"
  11492.                                    (default data segment) heap.
  11493.  
  11494.  Number                            Fatal Error Message
  11495.  ────────────────────────────────────────────────────────────────────────────
  11496.  C1059                             (continued)
  11497.  
  11498.                                    One of the following may be a solution:
  11499.  
  11500.                                    ■ Eliminate unnecessary include files,
  11501.                                    especially unneeded function prototypes.
  11502.  
  11503.                                    ■ Split the function existing at the
  11504.                                    given line number into two or more
  11505.                                    functions.
  11506.  
  11507.                                    ■ Split the current file into two or
  11508.                                    more files and  compile them separately.
  11509.  
  11510.  C1060                             compiler is out of far heap space
  11511.  
  11512.                                    The compiler ran out of storage for
  11513.                                    items that it stores in the far heap.
  11514.                                    Usually this is the result of having too
  11515.                                    many symbols.
  11516.  
  11517.                                    One of the following may be a solution:
  11518.  
  11519.                                    ■ Eliminate unnecessary include files,
  11520.                                    especially unneeded #define directives
  11521.                                    and function prototypes.
  11522.  
  11523.                                    ■ Eliminate some global variables.
  11524.  
  11525.                                    ■ Split the current file into two or
  11526.                                    more files and compile them separately.
  11527.  
  11528.                                    ■ Remove other programs or drivers
  11529.                                    running in the system which could be
  11530.                                    consuming significant amounts of memory.
  11531.  
  11532.  C1061                             compiler limit : blocks nested too
  11533.                                    deeply
  11534.  
  11535.                                    Nested blocks in the program exceeded
  11536.                                    the nesting limit allowed by the
  11537.                                    compiler.
  11538.  
  11539.                                    Rewrite the program, putting one or more
  11540.                                    nested blocks into a separate function.
  11541.  
  11542.  C1062                             error writing to preprocessor output
  11543.                                    file
  11544.  
  11545.                                    The compilation command included the /P
  11546.                                    option to produce a preprocessor output
  11547.                                    file, but not enough room was available
  11548.                                    to hold the file.
  11549.  
  11550.  C1063                             compiler limit : compiler stack overflow
  11551.  
  11552.                                    The program was too complex and caused
  11553.                                    the compiler stack to overflow.
  11554.  
  11555.                                    Simplify the program, making it more
  11556.                                    modular, and recompile.
  11557.  
  11558.  C1064                             compiler limit : token overflowed
  11559.                                    internal buffer
  11560.  
  11561.                                    The compiler read an identifier that is
  11562.                                    longer than the internal buffer used for
  11563.                                    identifier names.
  11564.  
  11565.                                    Shorten the name and recompile.
  11566.  
  11567.  Number                            Fatal Error Message
  11568.  ────────────────────────────────────────────────────────────────────────────
  11569.  C1068                             cannot open file 'filename'
  11570.  
  11571.                                    The compiler cannot open the given file.
  11572.  
  11573.                                    There are several possible causes for
  11574.                                    this error:
  11575.  
  11576.                                    ■ The file does not exist.
  11577.  
  11578.                                    ■ The file is marked read-only.
  11579.  
  11580.                                    ■ Not enough file handles exist.
  11581.  
  11582.  C1069                             write error on file 'filename'
  11583.  
  11584.                                    An error occurred while the compiler
  11585.                                    tried to write to the file. One possible
  11586.                                    cause of this error is insufficient disk
  11587.                                    space.
  11588.  
  11589.  C1070                             mismatched #if/#endif pair in file '
  11590.                                    filename'
  11591.  
  11592.                                    The preprocessor found the #if, #ifdef,
  11593.                                    or #ifndef directive, but did not find a
  11594.                                    corresponding #endif directive in the
  11595.                                    same source file.
  11596.  
  11597.  C1071                             unexpected end-of-file found in comment
  11598.  
  11599.                                    The compiler found the end of a file
  11600.                                    while scanning a comment.
  11601.  
  11602.                                    Probably a comment was not terminated.
  11603.                                    Start at the end of the file and search
  11604.                                    backward for the beginning of a comment.
  11605.                                    A comment begins with  /*  and ends with
  11606.                                     */, as in
  11607.  
  11608.                                    /* This is a comment */
  11609.  
  11610.                                    A comment cannot be split across files.
  11611.  
  11612.  C1072                             'filename' : cannot read file
  11613.  
  11614.                                    The compiler encountered an error when
  11615.                                    trying to read a file.
  11616.  
  11617.                                    Check the file-access attributes and be
  11618.                                    sure the disk does not have a bad sector.
  11619.  
  11620.  C1090                             'segment' : data allocation exceeds 64K
  11621.  
  11622.                                    The size of the named segment exceeds
  11623.                                    64K.
  11624.  
  11625.                                    This error occurs with _based allocation.
  11626.  
  11627.  C1126                             'identifier' : automatic allocation
  11628.                                    exceeds 'size'
  11629.  
  11630.                                    The space allocated for the local
  11631.                                    variables of a function exceeded the
  11632.                                    given limit.
  11633.  
  11634.  Number                            Fatal Error Message
  11635.  ────────────────────────────────────────────────────────────────────────────
  11636.  C1127                             'segment' : segment redefinition
  11637.  
  11638.                                    A segment was overwritten by another
  11639.                                    with the same name.
  11640.  
  11641.                                    For example, compiling in large model
  11642.                                    with
  11643.  
  11644.                                    #pragma alloc_text("TEXT", func1)
  11645.  
  11646.                                    creates two segments, the default
  11647.                                    segment  module_TEXT  and the specified
  11648.                                    segment  _TEXT. However, in small model,
  11649.                                    the default segment is  _TEXT, and the
  11650.                                    specified segment  _TEXT  will overwrite
  11651.                                    the default segment.
  11652.  
  11653.  
  11654.  D.1.2  Compilation Error Messages
  11655.  
  11656.  The messages listed below indicate that your program has errors. When the
  11657.  compiler encounters any of the errors listed in this section, it continues
  11658.  parsing the program (if possible) and outputs additional error messages.
  11659.  However, no object file is produced.
  11660.  
  11661.  Number                            Compilation Error Message
  11662.  ────────────────────────────────────────────────────────────────────────────
  11663.  C2000                             UNKNOWN ERROR Contact Microsoft Product
  11664.                                    Support Services
  11665.  
  11666.                                    The compiler detected an unknown error
  11667.                                    condition.
  11668.  
  11669.                                    Note the circumstances of the error and
  11670.                                    notify Microsoft Corporation by
  11671.                                    following the instructions in the
  11672.                                    Microsoft Product Assistance Request
  11673.                                    form at the back of C for Yourself,
  11674.                                    included in the QuickC version 2.5
  11675.                                    package.
  11676.  
  11677.  C2001                             newline in constant
  11678.  
  11679.                                    A string constant was continued onto a
  11680.                                    second line without either a backslash
  11681.                                    or closing and opening quotes.
  11682.  
  11683.                                    To break a string constant onto two
  11684.                                    lines in the source file:
  11685.  
  11686.                                    ■ End the first line with the
  11687.                                    line-continuation character, a backslash
  11688.                                    (\ ).
  11689.  
  11690.  or
  11691.  
  11692.                                    ■ Close the string on the first line
  11693.                                    with a double quotation mark, and open
  11694.                                    the string on the next line with another
  11695.                                    quotation mark.
  11696.  
  11697.                                    It is not sufficient to end the first
  11698.                                    line with \n, the escape sequence for
  11699.                                    embedding a newline character in a
  11700.                                    string constant.
  11701.  
  11702.  Number                            Compilation Error Message
  11703.  ────────────────────────────────────────────────────────────────────────────
  11704.  C2001                             (continued)
  11705.  
  11706.                                    The following two examples demonstrate
  11707.                                    causes of this error:
  11708.  
  11709.                                    printf("Hello,
  11710.                                    world");
  11711.  
  11712.                                    or
  11713.  
  11714.                                    printf("Hello,\n
  11715.                                    world");
  11716.  
  11717.                                    The following two examples show ways to
  11718.                                    correct this error:
  11719.  
  11720.                                    printf("Hello,\
  11721.                                    world");
  11722.  
  11723.                                    or
  11724.  
  11725.                                    printf("Hello,"
  11726.                                    " world");
  11727.  
  11728.                                    Note that any spaces at the beginning of
  11729.                                    the next line after a line-continuation
  11730.                                    character are included in the string
  11731.                                    constant. Note, also, that neither
  11732.                                    solution actually places a newline
  11733.                                    character into the string constant. To
  11734.                                    embed this character:
  11735.  
  11736.                                    printf("Hello,\n\
  11737.                                    world");
  11738.  
  11739.                                    or
  11740.  
  11741.                                    printf("Hello,\
  11742.                                    \nworld");
  11743.  
  11744.                                    or
  11745.  
  11746.                                    printf("Hello,\n"
  11747.                                        "world");
  11748.  
  11749.                                    or
  11750.  
  11751.                                    printf("Hello,"
  11752.                                     "\nworld");
  11753.  
  11754.  C2003                             expected 'defined id'
  11755.  
  11756.                                    An identifier was expected after the
  11757.                                    preprocessor operator defined.
  11758.  
  11759.  C2004                             expected 'defined(id)'
  11760.  
  11761.                                    An identifier was expected after the
  11762.                                    left parenthesis following the
  11763.                                    preprocessor operator defined.
  11764.  
  11765.  Number                            Compilation Error Message
  11766.  ────────────────────────────────────────────────────────────────────────────
  11767.  C2005                             #line expected a line number, found '
  11768.                                    token'
  11769.  
  11770.                                    A #line directive lacked the required
  11771.                                    line-number specification.
  11772.  
  11773.  C2006                             #include expected a file name, found '
  11774.                                    token'
  11775.  
  11776.                                    An #include directive lacked the
  11777.                                    required file-name specification.
  11778.  
  11779.  C2007                             #define syntax
  11780.  
  11781.                                    An identifier was expected following
  11782.                                    #define in a preprocessing directive.
  11783.  
  11784.  C2008                             'character' : unexpected in macro
  11785.                                    definition
  11786.  
  11787.                                    The given character was found
  11788.                                    immediately following the name of the
  11789.                                    macro.
  11790.  
  11791.  C2009                             reuse of macro formal 'identifier'
  11792.  
  11793.                                    The given identifier was used more than
  11794.                                    once in the formal-parameter list of a
  11795.                                    macro definition.
  11796.  
  11797.  C2010                             'character' : unexpected in macro
  11798.                                    formal-parameter list
  11799.  
  11800.                                    The given character was used incorrectly
  11801.                                    in the formal-parameter list of a macro
  11802.                                    definition.
  11803.  
  11804.  C2012                             missing name following '<'
  11805.  
  11806.                                    An #include directive lacked the
  11807.                                    required file-name specification.
  11808.  
  11809.  C2013                             missing '>'
  11810.  
  11811.                                    The closing angle bracket (>) was
  11812.                                    missing from an #include directive.
  11813.  
  11814.  C2014                             preprocessor command must start as first
  11815.                                    non-white-space
  11816.  
  11817.                                    Non-white-space characters appeared
  11818.                                    before the number sign (#) of a
  11819.                                    preprocessor directive on the same line.
  11820.  
  11821.  C2015                             too many characters in constant
  11822.  
  11823.                                    A character constant contained more than
  11824.                                    one character.
  11825.  
  11826.                                    Note that an escape sequence (for
  11827.                                    example, \t for tab) is converted to a
  11828.                                    single character.
  11829.  
  11830.  C2016                             no closing single quotation mark
  11831.  
  11832.                                    A newline character was found before the
  11833.                                    closing single quotation mark of a
  11834.                                    character constant.
  11835.  
  11836.  Number                            Compilation Error Message
  11837.  ────────────────────────────────────────────────────────────────────────────
  11838.  C2017                             illegal escape sequence
  11839.  
  11840.                                    An escape sequence appeared where one
  11841.                                    was not expected.
  11842.  
  11843.                                    An escape sequence (a backslash (\)
  11844.                                    followed by a number or letter) may
  11845.                                    occur only in a character or string
  11846.                                    constant.
  11847.  
  11848.  C2018                             unknown character 'hexnumber'
  11849.  
  11850.                                    The ASCII character corresponding to the
  11851.                                    given hexadecimal number appeared in the
  11852.                                    source file but is an illegal character.
  11853.  
  11854.                                    One possible cause of this error is
  11855.                                    corruption of the source file. Edit the
  11856.                                    file and look at the line on which the
  11857.                                    error occurred.
  11858.  
  11859.  C2019                             expected preprocessor directive, found '
  11860.                                    character'
  11861.  
  11862.                                    The given character followed a number
  11863.                                    sign (#), but it was not the first
  11864.                                    letter of a preprocessor directive.
  11865.  
  11866.  C2021                             expected exponent value, not 'character'
  11867.  
  11868.                                    The given character was used as the
  11869.                                    exponent of a floating-point constant
  11870.                                    but was not a valid number.
  11871.  
  11872.  C2022                             'number' : too big for character
  11873.  
  11874.                                    The octal number following a backslash
  11875.                                    (\) in a character or string constant
  11876.                                    was too large to be represented as a
  11877.                                    character.
  11878.  
  11879.  C2025                             'identifier' : enum/struct/union type
  11880.                                    redefinition
  11881.  
  11882.                                    The given identifier had already been
  11883.                                    used for an enumeration, structure, or
  11884.                                    union tag.
  11885.  
  11886.  C2026                             'identifier' : member of enum
  11887.                                    redefinition
  11888.  
  11889.                                    The given identifier has already been
  11890.                                    used for an enumeration constant, either
  11891.                                    within the same enumeration type or
  11892.                                    within another visible enumeration type.
  11893.  
  11894.  C2027                             use of undefined enum/struct/union '
  11895.                                    identifier'
  11896.  
  11897.                                    The given identifier referred to a
  11898.                                    structure or union type that was not
  11899.                                    defined.
  11900.  
  11901.  C2028                             struct/union member needs to be inside a
  11902.                                    struct/union
  11903.  
  11904.                                    Structure and union members must be
  11905.                                    declared within the structure or union.
  11906.  
  11907.  Number                            Compilation Error Message
  11908.  ────────────────────────────────────────────────────────────────────────────
  11909.  C2028                             (continued)
  11910.  
  11911.                                    This error may be caused by an
  11912.                                    enumeration declaration containing a
  11913.                                    declaration of a structure member, as in
  11914.                                    the following example:
  11915.  
  11916.                                    enum a {
  11917.                                           january,
  11918.                                           february,
  11919.                                           int march;    /* Illegal
  11920.                                    structure declaration */
  11921.                                           };
  11922.  
  11923.  C2030                             'identifier' : struct/union member
  11924.                                    redefinition
  11925.  
  11926.                                    The identifier was used for more than
  11927.                                    one member of the same structure or
  11928.                                    union.
  11929.  
  11930.  C2031                             'identifier' : function cannot be
  11931.                                    struct/union member
  11932.  
  11933.                                    The given function was declared to be a
  11934.                                    member of a structure or union.
  11935.  
  11936.                                    To correct this error, use a pointer to
  11937.                                    the function instead.
  11938.  
  11939.  C2033                             'identifier' : bit field cannot have
  11940.                                    indirection
  11941.  
  11942.                                    The given bit field was declared as a
  11943.                                    pointer (*), which is not allowed.
  11944.  
  11945.  C2034                             'identifier' : type of bit field too
  11946.                                    small for number of bits
  11947.  
  11948.                                    The number of bits specified in the
  11949.                                    bit-field declaration exceeded the
  11950.                                    number of bits in the given base type.
  11951.  
  11952.  C2035                             struct/union 'identifier' : unknown size
  11953.  
  11954.                                    The given structure or union had an
  11955.                                    undefined size.
  11956.  
  11957.                                    Usually this occurs when referencing a
  11958.                                    declared but not defined structure or
  11959.                                    union tag.
  11960.  
  11961.                                    For example, the following causes this
  11962.                                    error:
  11963.  
  11964.                                    struct s_tag *ps;
  11965.                                    ps = &my_var;
  11966.                                    *ps = 17; /* This line causes the error
  11967.                                    */
  11968.  
  11969.  C2037                             left of 'operator' specifies undefined
  11970.                                    struct/union 'identifier'
  11971.  
  11972.                                    The expression before the
  11973.                                    member-selection operator ( -> or .)
  11974.                                    identified a structure or union type
  11975.                                    that was not defined.
  11976.  
  11977.  C2038                             'identifier' : not struct/union member
  11978.  
  11979.                                    The given identifier was used in a
  11980.                                    context that required a structure or
  11981.                                    union member.
  11982.  
  11983.  Number                            Compilation Error Message
  11984.  ────────────────────────────────────────────────────────────────────────────
  11985.  C2041                             illegal digit 'character' for base '
  11986.                                    number'
  11987.  
  11988.                                    The given character was not a legal
  11989.                                    digit for the base used.
  11990.  
  11991.  C2042                             signed/unsigned keywords mutually
  11992.                                    exclusive
  11993.  
  11994.                                    The keywords signed and unsigned were
  11995.                                    both used in a single declaration, as in
  11996.                                    the following example:
  11997.  
  11998.                                    unsigned signed int i;
  11999.  
  12000.  C2043                             illegal break
  12001.  
  12002.                                    A break statement is legal only within a
  12003.                                    do, for, while, or switch statement.
  12004.  
  12005.  C2044                             illegal continue
  12006.  
  12007.                                    A continue statement is legal only
  12008.                                    within a do, for, or while statement.
  12009.  
  12010.  C2045                             'identifier' : label redefined
  12011.  
  12012.                                    The label appeared before more than one
  12013.                                    statement in the same function.
  12014.  
  12015.  C2046                             illegal case
  12016.  
  12017.                                    The keyword case may appear only within
  12018.                                    a switch statement.
  12019.  
  12020.  C2047                             illegal default
  12021.  
  12022.                                    The keyword default may appear only
  12023.                                    within a switch statement.
  12024.  
  12025.  C2048                             more than one default
  12026.  
  12027.                                    A switch statement contained more than
  12028.                                    one default label.
  12029.  
  12030.  C2049                             case value 'value' already used
  12031.  
  12032.                                    The case VALUE was already used in this
  12033.                                    switch statement.
  12034.  
  12035.  C2050                             nonintegral switch expression
  12036.  
  12037.                                    A switch expression did not evaluate to
  12038.                                    an integral value.
  12039.  
  12040.  C2051                             case expression not constant
  12041.  
  12042.                                    Case expressions must be integral
  12043.                                    constants.
  12044.  
  12045.  C2052                             case expression not integral
  12046.  
  12047.                                    Case expressions must be integral
  12048.                                    constants.
  12049.  
  12050.  Number                            Compilation Error Message
  12051.  ────────────────────────────────────────────────────────────────────────────
  12052.  C2054                             expected '(' to follow 'identifier'
  12053.  
  12054.                                    The context requires parentheses after
  12055.                                    the function IDENTIFIER.
  12056.  
  12057.                                    One cause of this error is omitting an
  12058.                                    equal sign (=) on a complex
  12059.                                    initialization, as in the following
  12060.                                    example:
  12061.  
  12062.                                    int array1[]    /* Missing = */
  12063.                                    {
  12064.                                      1,2,3
  12065.                                    };
  12066.  
  12067.  C2055                             expected formal-parameter list, not a
  12068.                                    type list
  12069.  
  12070.                                    An argument-type list appeared in a
  12071.                                    function definition instead of a formal-
  12072.                                    parameter list.
  12073.  
  12074.  C2056                             illegal expression
  12075.  
  12076.                                    An expression was illegal because of a
  12077.                                    previous error, which may not have
  12078.                                    produced an error message.
  12079.  
  12080.  C2057                             expected constant expression
  12081.  
  12082.                                    The context requires a constant
  12083.                                    expression.
  12084.  
  12085.  C2058                             constant expression is not integral
  12086.  
  12087.                                    The context requires an integral
  12088.                                    constant expression.
  12089.  
  12090.  C2059                             syntax error : 'token'
  12091.  
  12092.                                    The token caused a syntax error.
  12093.  
  12094.  C2060                             syntax error : end-of-file found
  12095.  
  12096.                                    The compiler expected at least one more
  12097.                                    token.
  12098.  
  12099.                                    Some causes of this error include:
  12100.  
  12101.                                    ■ Omitting a semicolon, as in
  12102.  
  12103.        int *p
  12104.  
  12105.                                    ■ Omitting a closing brace (}) from the
  12106.                                    last function, as in
  12107.  
  12108.     main()  {
  12109.  
  12110.  Number                            Compilation Error Message
  12111.  ────────────────────────────────────────────────────────────────────────────
  12112.  C2061                             syntax error : identifier 'identifier'
  12113.  
  12114.                                    The identifier caused a syntax error.
  12115.  
  12116.  C2062                             type 'type' unexpected
  12117.  
  12118.                                    The compiler did not expect the given
  12119.                                    type to appear here, possibly because it
  12120.                                    already had a required type.
  12121.  
  12122.  C2063                             'identifier' : not a function
  12123.  
  12124.                                    The given identifier was not declared as
  12125.                                    a function, but an attempt was made to
  12126.                                    use it as a function.
  12127.  
  12128.  C2064                             term does not evaluate to a function
  12129.  
  12130.                                    An attempt was made to call a function
  12131.                                    through an expression that did not
  12132.                                    evaluate to a function pointer.
  12133.  
  12134.  C2065                             'identifier' : undefined
  12135.  
  12136.                                    An attempt was made to use an identifier
  12137.                                    that was not defined.
  12138.  
  12139.  C2066                             cast to function type is illegal
  12140.  
  12141.                                    An object was cast to a function type,
  12142.                                    which is illegal.
  12143.  
  12144.                                    However, it is legal to cast an object
  12145.                                    to a function pointer.
  12146.  
  12147.  C2067                             cast to array type is illegal
  12148.  
  12149.                                    An object was cast to an array type.
  12150.  
  12151.  C2068                             illegal cast
  12152.  
  12153.                                    A type used in a cast operation was not
  12154.                                    legal for this expression.
  12155.  
  12156.  C2069                             cast of void term to nonvoid
  12157.  
  12158.                                    The void type was cast to a different
  12159.                                    type.
  12160.  
  12161.  C2070                             illegal sizeof operand
  12162.  
  12163.                                    The operand of a sizeof expression was
  12164.                                    not an identifier or a type name.
  12165.  
  12166.  C2071                             'identifier' : illegal storage class
  12167.  
  12168.                                    The given storage class cannot be used
  12169.                                    in this context.
  12170.  
  12171.  C2072                             'identifier' : initialization of a
  12172.                                    function
  12173.  
  12174.                                    An attempt was made to initialize a
  12175.                                    function.
  12176.  
  12177.  Number                            Compilation Error Message
  12178.  ────────────────────────────────────────────────────────────────────────────
  12179.  C2075                             'identifier' : array initialization
  12180.                                    needs curly braces
  12181.  
  12182.                                    There were no braces around the given
  12183.                                    array initializer.
  12184.  
  12185.  C2076                             'identifier' : struct/union
  12186.                                    initialization needs curly braces
  12187.  
  12188.                                    There were no braces around the given
  12189.                                    structure or union initializer.
  12190.  
  12191.  C2077                             nonscalar field initializer 'identifier'
  12192.  
  12193.                                    An attempt was made to initialize a
  12194.                                    bit-field member of a structure with a
  12195.                                    non- scalar value.
  12196.  
  12197.  C2078                             too many initializers
  12198.  
  12199.                                    The number of initializers exceeded the
  12200.                                    number of objects to be initialized.
  12201.  
  12202.  C2079                             'identifier' uses undefined struct/union
  12203.                                    'name'
  12204.  
  12205.                                    The identifier was declared as structure
  12206.                                    or union type name, which had not been
  12207.                                    defined.
  12208.  
  12209.  C2080                             illegal far _fastcall function
  12210.  
  12211.                                    A far _fastcall function may not be
  12212.                                    compiled with the /Gw option, or with
  12213.                                    the /Gq option if stack checking is
  12214.                                    enabled.
  12215.  
  12216.  C2082                             redefinition of formal parameter '
  12217.                                    identifier'
  12218.  
  12219.                                    A formal parameter to a function was
  12220.                                    redeclared within the function body.
  12221.  
  12222.  C2084                             function 'function' already has a body
  12223.  
  12224.                                    The function has already been defined.
  12225.  
  12226.  C2085                             'identifier' : not in formal-parameter
  12227.                                    list
  12228.  
  12229.                                    The identifier was declared in a
  12230.                                    function definition, but not in the
  12231.                                    formal- parameter list.
  12232.  
  12233.                                    A common cause of this error is the
  12234.                                    omission of a semicolon at the end of a
  12235.                                    function prototype, as in the following
  12236.                                    example:
  12237.  
  12238.                                    void func1( void )
  12239.                                    void main( void )
  12240.                                    {
  12241.                                    }
  12242.  
  12243.                                    With the semicolon missing, the compiler
  12244.                                    assumes that  func1  is a function
  12245.                                    definition, not a prototype, and that
  12246.                                    the function  main  is being defined
  12247.                                    within the function  func1. It generates
  12248.                                    C2085 on the identifier  main.
  12249.  
  12250.  Number                            Compilation Error Message
  12251.  ────────────────────────────────────────────────────────────────────────────
  12252.  C2086                             'identifier' : redefinition
  12253.  
  12254.                                    The given identifier was defined more
  12255.                                    than once, or a subsequent declaration
  12256.                                    differed from a previous one.
  12257.  
  12258.                                    The following are ways to cause this
  12259.                                    error:
  12260.  
  12261.                                    int a;
  12262.                                    char a;
  12263.                                    main()
  12264.                                    {
  12265.                                    }
  12266.  
  12267.                                    or
  12268.  
  12269.                                    main()
  12270.                                    {
  12271.                                       int a;
  12272.                                       int a;
  12273.                                    }
  12274.  
  12275.                                    However, the following does not cause
  12276.                                    this error:
  12277.  
  12278.                                    int a;
  12279.                                    int a;
  12280.                                    main()
  12281.                                    {
  12282.                                    }
  12283.  
  12284.  C2087                             'identifier' : missing subscript
  12285.  
  12286.                                    The definition of an array with multiple
  12287.                                    subscripts was missing a subscript value
  12288.                                    for a dimension other than the first
  12289.                                    dimension.
  12290.  
  12291.                                    The following is an example of an
  12292.                                    illegal definition:
  12293.  
  12294.                                    int func(a)
  12295.                                       char a[10][];
  12296.                                       { }
  12297.  
  12298.                                    The following is an example of a legal
  12299.                                    definition:
  12300.  
  12301.                                    int func(a)
  12302.                                        char a[][5];
  12303.                                        { }
  12304.  
  12305.  C2090                             function returns array
  12306.  
  12307.                                    A function cannot return an array. It
  12308.                                    can return a pointer to an array.
  12309.  
  12310.  Number                            Compilation Error Message
  12311.  ────────────────────────────────────────────────────────────────────────────
  12312.  C2091                             function returns function
  12313.  
  12314.                                    A function cannot return a function. It
  12315.                                    can return a pointer to a function.
  12316.  
  12317.  C2092                             array element type cannot be function
  12318.  
  12319.                                    Arrays of functions are not allowed.
  12320.                                    Arrays of pointers to functions are
  12321.                                    allowed.
  12322.  
  12323.  C2093                             cannot use address of automatic variable
  12324.                                    as static initializer
  12325.  
  12326.                                    The program tried to use the address of
  12327.                                    an automatic variable in the initializer
  12328.                                    of a static item, as in the following
  12329.                                    example:
  12330.  
  12331.                                    func()
  12332.                                    {
  12333.                                        int i;
  12334.                                        static int *ip=&i;
  12335.                                        .
  12336.                                        .
  12337.                                        .
  12338.                                    }
  12339.  
  12340.  C2094                             label 'identifier' was undefined
  12341.  
  12342.                                    The function did not contain a statement
  12343.                                    labeled with the given identifier.
  12344.  
  12345.  C2095                             'function' : actual has type void :
  12346.                                    parameter 'number'
  12347.  
  12348.                                    An attempt was made to pass a void
  12349.                                    argument to a function. The given number
  12350.                                    indicates which argument was in error.
  12351.  
  12352.                                    Formal parameters and arguments to
  12353.                                    functions cannot have type void. They
  12354.                                    can, however, have type void * (pointer
  12355.                                    to void).
  12356.  
  12357.  C2096                             struct/union comparison illegal
  12358.  
  12359.                                    Two structures or unions cannot be
  12360.                                    compared. Individual members of
  12361.                                    structures and unions can be compared.
  12362.  
  12363.  C2097                             illegal initialization
  12364.  
  12365.                                    One of the following initializations was
  12366.                                    attempted:
  12367.  
  12368.                                    ■ A variable using a nonconstant value
  12369.  
  12370.                                    ■ A short address with a long address
  12371.  
  12372.                                    ■ A local struct/union/array with a
  12373.                                    nonconstant expression when compiling
  12374.                                    with the /Za option
  12375.  
  12376.  Number                            Compilation Error Message
  12377.  ────────────────────────────────────────────────────────────────────────────
  12378.  C2097                             (continued)
  12379.  
  12380.                                    ■ An expression containing a comma
  12381.                                    operator
  12382.  
  12383.                                    ■ An expression that is neither constant
  12384.                                    nor symbolic
  12385.  
  12386.  C2098                             nonaddress expression
  12387.  
  12388.                                    An address was expected as the
  12389.                                    initialization expression.
  12390.  
  12391.  C2099                             nonconstant initializer
  12392.  
  12393.                                    An initializer used a nonconstant offset.
  12394.  
  12395.  C2100                             illegal indirection
  12396.  
  12397.                                    The indirection operator (*) was applied
  12398.                                    to a nonpointer value.
  12399.  
  12400.  C2101                             '&' on constant
  12401.  
  12402.                                    The address-of operator (&) did not have
  12403.                                    an lvalue as its operand.
  12404.  
  12405.  C2102                             '&' requires lvalue
  12406.  
  12407.                                    The address-of operator (&) must be
  12408.                                    applied to an lvalue expression.
  12409.  
  12410.  C2103                             '&' on register variable
  12411.  
  12412.                                    An attempt was made to take the address
  12413.                                    of a register variable.
  12414.  
  12415.  C2104                             '&' on bit field ignored
  12416.  
  12417.                                    An attempt was made to take the address
  12418.                                    of a bit field.
  12419.  
  12420.  C2105                             'operator' needs lvalue
  12421.  
  12422.                                    The given operator did not have an
  12423.                                    lvalue operand.
  12424.  
  12425.  C2106                             'operator' : left operand must be lvalue
  12426.  
  12427.                                    The left operand of the given operator
  12428.                                    was not an lvalue.
  12429.  
  12430.  C2107                             illegal index, indirection not allowed
  12431.  
  12432.                                    A subscript was applied to an expression
  12433.                                    that did not evaluate to a pointer.
  12434.  
  12435.  C2108                             nonintegral index
  12436.  
  12437.                                    A nonintegral expression was used in an
  12438.                                    array subscript.
  12439.  
  12440.  C2109                             subscript on nonarray
  12441.  
  12442.                                    A subscript was used on a variable that
  12443.                                    was not an array.
  12444.  
  12445.  Number                            Compilation Error Message
  12446.  ────────────────────────────────────────────────────────────────────────────
  12447.  C2110                             pointer + pointer
  12448.  
  12449.                                    An attempt was made to add one pointer
  12450.                                    to another using the plus (+) operator.
  12451.  
  12452.  C2111                             pointer + nonintegral value
  12453.  
  12454.                                    An attempt was made to add a nonintegral
  12455.                                    value to a pointer.
  12456.  
  12457.  C2112                             illegal pointer subtraction
  12458.  
  12459.                                    An attempt was made to subtract pointers
  12460.                                    that did not point to the same type.
  12461.  
  12462.  C2113                             pointer subtracted from nonpointer
  12463.  
  12464.                                    The right operand in a subtraction
  12465.                                    operation using the minus (-) operator
  12466.                                    was a pointer, but the left operand was
  12467.                                    not.
  12468.  
  12469.  C2114                             'operator' : pointer on left; needs
  12470.                                    integral right
  12471.  
  12472.                                    The left operand of the given operator
  12473.                                    was a pointer; the right operand must be
  12474.                                    an integral value.
  12475.  
  12476.  C2115                             'identifier' : incompatible types
  12477.  
  12478.                                    An expression contained incompatible
  12479.                                    types.
  12480.  
  12481.  C2117                             'operator' : illegal for struct/union
  12482.  
  12483.                                    Structure and union type values are not
  12484.                                    allowed with the given operator.
  12485.  
  12486.  C2118                             negative subscript
  12487.  
  12488.                                    A value defining an array size was
  12489.                                    negative.
  12490.  
  12491.  C2119                             typedef types both define indirection
  12492.  
  12493.                                    Two typedef types were used to declare
  12494.                                    an item and both typedef types had
  12495.                                    indirection.
  12496.  
  12497.                                    For example, the declaration of  p  in
  12498.                                    the following example is illegal:
  12499.  
  12500.                                    typedef int *p_int;
  12501.                                    typedef short *p_short;
  12502.                                    p_short p_int p;    /* Illegal */
  12503.  
  12504.  C2120                             void illegal with all types
  12505.  
  12506.                                    The void type was used in a declaration
  12507.                                    with another type.
  12508.  
  12509.  C2121                             'operator' : bad left/right operand
  12510.  
  12511.                                    The left or right operand of the given
  12512.                                    operator was illegal for that operator.
  12513.  
  12514.  Number                            Compilation Error Message
  12515.  ────────────────────────────────────────────────────────────────────────────
  12516.  C2124                             divide or mod by zero
  12517.  
  12518.                                    A constant expression was evaluated and
  12519.                                    found to have a zero denominator.
  12520.  
  12521.  C2125                             'identifier' : allocation exceeds 64K
  12522.  
  12523.                                    The given item exceeded the size limit
  12524.                                    of 64K.
  12525.  
  12526.  C2127                             parameter allocation exceeds 32K
  12527.  
  12528.                                    The storage space required for the
  12529.                                    parameters to a function exceeded the
  12530.                                    limit of 32K.
  12531.  
  12532.  C2128                             'identifier' : huge array cannot be
  12533.                                    aligned to segment boundary
  12534.  
  12535.                                    The given huge array was large enough to
  12536.                                    cross two segment boundaries, but could
  12537.                                    not be aligned to both boundaries to
  12538.                                    prevent an individual array element from
  12539.                                    crossing a boundary.
  12540.  
  12541.                                    If the size of a huge array causes the
  12542.                                    array to cross two boundaries, the size
  12543.                                    of each array element must be a power of
  12544.                                    two, so that a whole number of elements
  12545.                                    will fit between two segment boundaries.
  12546.  
  12547.  C2129                             static function 'function' not found
  12548.  
  12549.                                    A forward reference was made to a static
  12550.                                    function that was never defined.
  12551.  
  12552.  C2130                             #line expected a string containing the
  12553.                                    file name, found 'token'
  12554.  
  12555.                                    The optional token following the line
  12556.                                    number on a #line directive was not a
  12557.                                    string.
  12558.  
  12559.  C2131                             more than one memory attribute
  12560.  
  12561.                                    More than one of the keywords _near,
  12562.                                    _far, _huge, or _based were applied to
  12563.                                    an item, as in the following example:
  12564.  
  12565.                                    typedef int _near nint;
  12566.                                    nint _far a;    /* Illegal */
  12567.  
  12568.  C2132                             syntax error : unexpected identifier
  12569.  
  12570.                                    An identifier appeared in a
  12571.                                    syntactically illegal context.
  12572.  
  12573.  C2133                             'identifier' : unknown size
  12574.  
  12575.                                    An attempt was made to declare an
  12576.                                    unsized array as a local variable.
  12577.  
  12578.  Number                            Compilation Error Message
  12579.  ────────────────────────────────────────────────────────────────────────────
  12580.  C2134                             'identifier' : struct/union too large
  12581.  
  12582.                                    The size of a structure or union
  12583.                                    exceeded the 64K compiler limit.
  12584.  
  12585.  C2136                             'function' : prototype must have
  12586.                                    parameter types
  12587.  
  12588.                                    A function prototype declarator had
  12589.                                    formal-parameter names, but no types
  12590.                                    were provided for the parameters.
  12591.  
  12592.                                    A formal parameter in a function
  12593.                                    prototype must either have a type or be
  12594.                                    represented by an ellipsis (...) to
  12595.                                    indicate a variable number of arguments
  12596.                                    and no type checking.
  12597.  
  12598.                                    One cause of this error is a misspelling
  12599.                                    of a type name in a prototype that does
  12600.                                    not provide the names of formal
  12601.                                    parameters.
  12602.  
  12603.  C2137                             empty character constant
  12604.  
  12605.                                    The illegal empty-character constant ('')
  12606.                                    was used.
  12607.  
  12608.  C2138                             unmatched close comment '*/'
  12609.  
  12610.                                    The compiler detected an open-comment
  12611.                                    delimiter (/*) without a matching
  12612.                                    close-comment delimiter (*/). This error
  12613.                                    usually indicates an attempt to use
  12614.                                    illegal nested comments.
  12615.  
  12616.  C2139                             type following 'identifier' is illegal
  12617.  
  12618.                                    Two types were used in the same
  12619.                                    declaration.
  12620.  
  12621.                                    For example:
  12622.  
  12623.                                    int double a;
  12624.  
  12625.  C2140                             argument cannot be function type
  12626.  
  12627.                                    A function was declared as a formal
  12628.                                    parameter of another function, as in the
  12629.                                    following example:
  12630.  
  12631.                                    int func1(a)
  12632.                                        int a( );
  12633.  
  12634.  C2141                             value out of range for enum constant
  12635.  
  12636.                                    An enumeration constant had a value
  12637.                                    outside the range of values allowed for
  12638.                                    type int.
  12639.  
  12640.  C2142                             ellipsis requires three periods
  12641.  
  12642.                                    The compiler detected a token consisting
  12643.                                    of two periods ( .. ) and assumed that
  12644.                                    an ellipsis ( ... ) was intended.
  12645.  
  12646.  Number                            Compilation Error Message
  12647.  ────────────────────────────────────────────────────────────────────────────
  12648.  C2143                             syntax error : missing 'token1' before '
  12649.                                    token2'
  12650.  
  12651.                                    The compiler expected token1 to appear
  12652.                                    before token2.
  12653.  
  12654.                                    This message may appear if a required
  12655.                                    closing brace, right parenthesis, or
  12656.                                    semicolon is missing.
  12657.  
  12658.  C2144                             syntax error : missing 'token' before
  12659.                                    type 'type'
  12660.  
  12661.                                    The compiler expected the given token to
  12662.                                    appear before the given type name.
  12663.  
  12664.                                    This message may appear if a required
  12665.                                    closing brace, right parenthesis, or
  12666.                                    semicolon is missing.
  12667.  
  12668.  C2145                             syntax error : missing 'token' before
  12669.                                    identifier
  12670.  
  12671.                                    The compiler expected the given token to
  12672.                                    appear before an identifier.
  12673.  
  12674.                                    This message may appear if a semicolon
  12675.                                    (;) does not appear after the last
  12676.                                    declaration of a block.
  12677.  
  12678.  C2146                             syntax error : missing 'token' before
  12679.                                    identifier 'identifier'
  12680.  
  12681.                                    The compiler expected the given token to
  12682.                                    appear before the given identifier.
  12683.  
  12684.  C2147                             unknown size
  12685.  
  12686.                                    An attempt was made to increment an
  12687.                                    index or pointer to an array whose base
  12688.                                    type has not yet been declared.
  12689.  
  12690.  C2148                             array too large
  12691.  
  12692.                                    An array exceeded the maximum legal size
  12693.                                    of 64K.
  12694.  
  12695.                                    Either reduce the size of the array, or
  12696.                                    declare it with _huge.
  12697.  
  12698.  C2149                             'identifier' : named bit field cannot
  12699.                                    have 0 width
  12700.  
  12701.                                    The given named bit field had zero width.
  12702.                                    Only unnamed bit fields are allowed to
  12703.                                    have zero width.
  12704.  
  12705.  C2150                             'identifier' : bit field must have type
  12706.                                    int, signed int, or unsigned int
  12707.  
  12708.                                    The ANSI C standard requires bit fields
  12709.                                    to have types of int, signed int, or
  12710.                                    unsigned int. This message appears only
  12711.                                    when compiling with the /Za option.
  12712.  
  12713.  C2151                             more than one language attribute
  12714.  
  12715.                                    More than one keyword specifying a
  12716.                                    calling convention for a function was
  12717.                                    given.
  12718.  
  12719.  Number                            Compilation Error Message
  12720.  ────────────────────────────────────────────────────────────────────────────
  12721.  C2152                             'identifier' : pointers to functions
  12722.                                    with different attributes
  12723.  
  12724.                                    An attempt was made to assign a pointer
  12725.                                    to a function declared with one calling
  12726.                                    convention (_cdecl, _fortran, _pascal,
  12727.                                    or _fastcall) to a pointer to a function
  12728.                                    declared with a different calling
  12729.                                    convention.
  12730.  
  12731.  C2153                             hex constants must have at least 1 hex
  12732.                                    digit
  12733.  
  12734.                                    The hexadecimal constants 0x, 0X and \x
  12735.                                    are illegal. At least one hexadecimal
  12736.                                    digit must follow the "x" or "X".
  12737.  
  12738.  C2154                             'segment' : does not refer to a segment
  12739.                                    name
  12740.  
  12741.                                    A _based allocated variable must be
  12742.                                    allocated in a segment unless it is
  12743.                                    extern and uninitialized.
  12744.  
  12745.  C2156                             pragma must be outside function
  12746.  
  12747.                                    A pragma that must be specified at a
  12748.                                    global level, outside a function body,
  12749.                                    occurred within a function.
  12750.  
  12751.                                    For example, the following causes this
  12752.                                    error:
  12753.  
  12754.                                    main()
  12755.                                    {
  12756.                                      #pragma optimize("l", on)
  12757.                                    }
  12758.  
  12759.  C2157                             'function' : must be declared before use
  12760.                                    in pragma list
  12761.  
  12762.                                    The function name in the list of
  12763.                                    functions for an alloc_text pragma has
  12764.                                    not been declared prior to being
  12765.                                    referenced in the list.
  12766.  
  12767.  C2158                             'identifier' : is a function
  12768.  
  12769.                                    The given identifier was specified in
  12770.                                    the list of variables in a same_seg
  12771.                                    pragma but was previously declared as a
  12772.                                    function.
  12773.  
  12774.  C2159                             more than one storage class specified
  12775.  
  12776.                                    A declaration contained more than one
  12777.                                    storage class, as in
  12778.  
  12779.                                    extern static int i;
  12780.  
  12781.  C2160                             ## cannot occur at the beginning of a
  12782.                                    macro definition
  12783.  
  12784.                                    A macro definition began with a
  12785.                                    token-pasting operator (##), as in
  12786.  
  12787.                                    #define mac(a,b) ##a
  12788.  
  12789.  Number                            Compilation Error Message
  12790.  ────────────────────────────────────────────────────────────────────────────
  12791.  C2161                             ## cannot occur at the end of a macro
  12792.                                    definition
  12793.  
  12794.                                    A macro definition ended with a
  12795.                                    token-pasting operator (##), as in
  12796.  
  12797.                                    #define mac(a,b) a##
  12798.  
  12799.  C2162                             expected macro formal parameter
  12800.  
  12801.                                    The token following a stringizing
  12802.                                    operator (#) was not a formal-parameter
  12803.                                    name.
  12804.  
  12805.                                    For example:
  12806.  
  12807.                                    define print(a) printf(#b)
  12808.  
  12809.  C2163                             'function' : not available as an
  12810.                                    intrinsic function
  12811.  
  12812.                                    A function specified in the list of
  12813.                                    functions for an intrinsic or function
  12814.                                    pragma is not one of the functions
  12815.                                    available in intrinsic form.
  12816.  
  12817.  C2164                             'function' : intrinsic function not
  12818.                                    declared
  12819.  
  12820.                                    The given function was not declared
  12821.                                    before being used in an intrinsic pragma.
  12822.                                    This error appears only when compiling
  12823.                                    with the /Oi option.
  12824.  
  12825.  C2165                             'keyword' : cannot modify pointers to
  12826.                                    data
  12827.  
  12828.                                    The _fortran, _pascal, _cdecl, or
  12829.                                    _fastcall keyword was used illegally to
  12830.                                    modify a pointer to data, as in the
  12831.                                    following example:
  12832.  
  12833.                                    char _pascal *p;
  12834.  
  12835.  C2166                             lvalue specifies 'const' object
  12836.  
  12837.                                    An attempt was made to modify an item
  12838.                                    declared with const type.
  12839.  
  12840.  C2167                             'function' : too many actual parameters
  12841.                                    for intrinsic function
  12842.  
  12843.                                    A reference to the intrinsic function
  12844.                                    name contained too many actual
  12845.                                    parameters.
  12846.  
  12847.  C2168                             'function' : too few actual parameters
  12848.                                    for intrinsic function
  12849.  
  12850.                                    A reference to the intrinsic function
  12851.                                    name contained too few actual parameters.
  12852.  
  12853.  C2169                             'function' : intrinsic function, cannot
  12854.                                    be defined
  12855.  
  12856.                                    An attempt was made to provide a
  12857.                                    function definition for a function
  12858.                                    already declared as an intrinsic.
  12859.  
  12860.  Number                            Compilation Error Message
  12861.  ────────────────────────────────────────────────────────────────────────────
  12862.  C2170                             'identifier' : not declared as a
  12863.                                    function, cannot be intrinsic
  12864.  
  12865.                                    The intrinsic pragma was used for an
  12866.                                    item other than a function, or for a
  12867.                                    function that does not have an intrinsic
  12868.                                    form.
  12869.  
  12870.  C2171                             'operator' : illegal operand
  12871.  
  12872.                                    The given unary operator was used with
  12873.                                    an illegal operand type, as in the
  12874.                                    following example:
  12875.  
  12876.                                    int (*fp)();
  12877.                                    double d,d1;
  12878.                                    .
  12879.                                    .
  12880.                                    .
  12881.                                    fp++;
  12882.                                    d = ~d1;
  12883.  
  12884.  C2172                             'function' : actual is not a pointer :
  12885.                                    parameter 'number'
  12886.  
  12887.                                    An attempt was made to pass an argument
  12888.                                    that was not a pointer to a function
  12889.                                    that expected a pointer. The given
  12890.                                    number indicates which argument was in
  12891.                                    error.
  12892.  
  12893.  C2173                             'function' : actual is not a pointer :
  12894.                                    parameter 'number1',  parameter list '
  12895.                                    number2'
  12896.  
  12897.                                    An attempt was made to pass a nonpointer
  12898.                                    argument to a function that expected a
  12899.                                    pointer.
  12900.  
  12901.                                    This error occurs in calls that return a
  12902.                                    pointer to a function. The first number
  12903.                                    indicates which argument was in error;
  12904.                                    the second number indicates which
  12905.                                    argument list contained the invalid
  12906.                                    argument.
  12907.  
  12908.  C2174                             'function' : actual has type void :
  12909.                                    parameter 'number1',  parameter list '
  12910.                                    number2'
  12911.  
  12912.                                    An attempt was made to pass a void
  12913.                                    argument to a function. Formal
  12914.                                    parameters and arguments to functions
  12915.                                    cannot have type void. They can, however,
  12916.                                    have type void * (pointer to void).
  12917.  
  12918.                                    This error occurs in calls that return a
  12919.                                    pointer to a function. The first number
  12920.                                    indicates which argument was in error;
  12921.                                    the second number indicates which
  12922.                                    argument list contained the invalid
  12923.                                    argument.
  12924.  
  12925.  Number                            Compilation Error Message
  12926.  ────────────────────────────────────────────────────────────────────────────
  12927.  C2175                             'function' : unresolved external
  12928.  
  12929.                                    The given function is not defined in the
  12930.                                    source file, or built into the QuickC
  12931.                                    programming environment, or present in
  12932.                                    the Quick library (if any) that was
  12933.                                    loaded.
  12934.  
  12935.                                    This error occurs only for single-module
  12936.                                    programs created in the QuickC
  12937.                                    environment. To solve this problem,
  12938.                                    either define the function in the source
  12939.                                    file, load a Quick library containing
  12940.                                    the function, or (if the function is a
  12941.                                    standard C library function) create a
  12942.                                    program list for the program.
  12943.  
  12944.                                    This error can also occur if you are
  12945.                                    using graphics functions and did not
  12946.                                    build GRAPHICS.LIB or PGCHART.LIB into
  12947.                                    your combined library during the SETUP
  12948.                                    operation. If this is the case, add
  12949.                                    GRAPHICS.LIB or PGCHART.LIB to your
  12950.                                    program list and rebuild your program.
  12951.  
  12952.  C2176                             static huge data not supported
  12953.  
  12954.                                    Declarations of _huge arrays are not
  12955.                                    supported in QuickC. Declare a _huge
  12956.                                    pointer to the data item, and allocate
  12957.                                    such an array dynamically using halloc(
  12958.                                    ).
  12959.  
  12960.  C2177                             constant too big
  12961.  
  12962.                                    Information was lost because a constant
  12963.                                    value was too large to be represented in
  12964.                                    the type to which it was assigned.
  12965.  
  12966.  C2178                             'identifier' : storage class for
  12967.                                    same_seg variables must be extern
  12968.  
  12969.                                    The given variable was specified in a
  12970.                                    same_seg pragma, but it was not declared
  12971.                                    with extern storage class.
  12972.  
  12973.  C2179                             'identifier' : was used in same_seg, but
  12974.                                    storage class is no longer extern
  12975.  
  12976.                                    The given variable was specified in a
  12977.                                    same_seg pragma, but it was redeclared
  12978.                                    with a storage class other than extern.
  12979.  
  12980.  C2180                             controlling expression has type 'void'
  12981.  
  12982.                                    The controlling expression in an if,
  12983.                                    while, for, or do statement had void
  12984.                                    type. The expression was either a
  12985.                                    function with void return type or an
  12986.                                    expression cast to void.
  12987.  
  12988.  C2182                             'identifier' : has type 'void'
  12989.  
  12990.                                    The given variable was declared with the
  12991.                                    void keyword. The void keyword can be
  12992.                                    used only in function declarations.
  12993.  
  12994.  Number                            Compilation Error Message
  12995.  ────────────────────────────────────────────────────────────────────────────
  12996.  C2185                             'identifier' : illegal _based allocation
  12997.  
  12998.                                    A _based allocated variable that
  12999.                                    explicitly has extern storage class and
  13000.                                    is uninitialized may not have a base of
  13001.                                    any of the following:
  13002.  
  13003.                                    ■ (_segment) & var
  13004.  
  13005.                                    ■ _segname("_STACK")
  13006.  
  13007.                                    ■ (_segment)_self
  13008.  
  13009.                                    ■ void
  13010.  
  13011.                                    If the variable does not explicitly have
  13012.                                    extern storage class or it is
  13013.                                    uninitialized, then its base must use
  13014.                                    _segname("string") where string is any
  13015.                                    segment name or reserved segment name
  13016.                                    except "_STACK".
  13017.  
  13018.  C2187                             cast of near function pointer to far
  13019.                                    function pointer
  13020.  
  13021.                                    An attempt was made to cast a near
  13022.                                    function pointer as a far function
  13023.                                    pointer.
  13024.  
  13025.  C2189                             #error : 'string'
  13026.  
  13027.                                    An #error directive was encountered. The
  13028.                                    string is the descriptive text supplied
  13029.                                    in the directive.
  13030.  
  13031.  C2193                             'identifier' : already in a segment
  13032.  
  13033.                                    A variable in the same_seg pragma has
  13034.                                    already been allocated in a segment,
  13035.                                    using _based.
  13036.  
  13037.  C2194                             'segment' : is a text segment
  13038.  
  13039.                                    The given text segment was used where a
  13040.                                    data, const, or bss segment was expected.
  13041.  
  13042.  C2195                             'segment' : is a data segment
  13043.  
  13044.                                    The given data segment was used where a
  13045.                                    text segment was expected.
  13046.  
  13047.  C2196                             /ML cannot be used with floating point
  13048.  
  13049.                                    The /ML command-line option requires
  13050.                                    alternate math. QuickC does not support
  13051.                                    alternate math. The /ML option is
  13052.                                    allowed with only when no floating-point
  13053.                                    code is used.
  13054.  
  13055.  Number                            Compilation Error Message
  13056.  ────────────────────────────────────────────────────────────────────────────
  13057.  C2200                             'function' : function has already been
  13058.                                    defined
  13059.  
  13060.                                    A function name passed as an argument in
  13061.                                    an alloc_text pragma has already been
  13062.                                    defined.
  13063.  
  13064.  C2201                             'function' : storage class must be
  13065.                                    extern
  13066.  
  13067.                                    A function declaration appears within a
  13068.                                    block, but the function is not declared
  13069.                                    extern. This causes an error if the /Za
  13070.                                    option is in effect.
  13071.  
  13072.                                    For example, the following causes this
  13073.                                    error when compiled with /Za:
  13074.  
  13075.                                    main()
  13076.                                    {
  13077.                                        static int func1();
  13078.                                    }
  13079.  
  13080.  C2205                             'identifier' : cannot initialize extern
  13081.                                    block-scoped variables
  13082.  
  13083.                                    A variable with extern storage class may
  13084.                                    not be initialized in a function.
  13085.  
  13086.  C2206                             'function' : typedef cannot be used for
  13087.                                    function definition
  13088.  
  13089.                                    A typedef was used to define a function
  13090.                                    type.
  13091.  
  13092.                                    For example:
  13093.  
  13094.                                    typedef int functyp();
  13095.                                    functyp func1
  13096.                                        { }
  13097.  
  13098.  C2207                             'member' in struct/union 'tag' has a
  13099.                                    zero-sized array
  13100.  
  13101.                                    The given member in the given structure
  13102.                                    or union contains an array without a
  13103.                                    subscript or with a zero subscript. Such
  13104.                                    an array is legal only as the last
  13105.                                    member of a structure or union.
  13106.  
  13107.  C2208                             no members defined using this type
  13108.  
  13109.                                    An enum, struct, or union was defined
  13110.                                    without any members. This is an error
  13111.                                    only when compiling with the /Za option;
  13112.                                    otherwise, it is a warning.
  13113.  
  13114.  C2209                             type cast in _based construct must be
  13115.                                    (_segment)
  13116.  
  13117.                                    The only type allowed within a cast in a
  13118.                                    _based declarator is (_segment).
  13119.  
  13120.  C2210                             'identifier' : must be near/far data
  13121.                                    pointer
  13122.  
  13123.                                    The base in a _based declarator may not
  13124.                                    be an array, a function, or a _based
  13125.                                    pointer.
  13126.  
  13127.  Number                            Compilation Error Message
  13128.  ────────────────────────────────────────────────────────────────────────────
  13129.  C2211                             (_segment) applied to function
  13130.                                    identifier 'function'
  13131.  
  13132.                                    The item cast in a _based declarator
  13133.                                    must not be a function.
  13134.  
  13135.  C2212                             'identifier' : _based not available for
  13136.                                    functions/pointers to functions
  13137.  
  13138.                                    Functions cannot be _based allocated.
  13139.                                    Use the alloc_text pragma.
  13140.  
  13141.  C2213                             'identifier' : illegal argument to
  13142.                                    _based
  13143.  
  13144.                                    A symbol used as a base must have type
  13145.                                    _segment or be a near or far pointer.
  13146.  
  13147.  C2214                             pointers based on void require the use
  13148.                                    of :>
  13149.  
  13150.                                    A _based pointer based on void cannot be
  13151.                                    dereferenced. Use the base (:>) operator
  13152.                                    to create an address that can be
  13153.                                    dereferenced.
  13154.  
  13155.  C2215                             :> operator only for objects based on
  13156.                                    void
  13157.  
  13158.                                    The right operand of the base (:>)
  13159.                                    operator must be a pointer based on void,
  13160.                                    as in
  13161.  
  13162.                                    char _based(void) *cbvpi
  13163.  
  13164.  C2216                             'attribute1' may not be used with '
  13165.                                    attribute2'
  13166.  
  13167.                                    The given function attributes are
  13168.                                    incompatible.
  13169.  
  13170.                                    Some combinations of attributes that
  13171.                                    cause this error are
  13172.  
  13173.                                    ■ _saveregs and _interrupt
  13174.  
  13175.                                    ■ _fastcall and _saveregs
  13176.  
  13177.                                    ■ _fastcall and _interrupt
  13178.  
  13179.                                    ■ _fastcall and _export
  13180.  
  13181.  C2217                             'attribute1' must be used with '
  13182.                                    attribute2'
  13183.  
  13184.                                    The first function attribute requires
  13185.                                    the second attribute to be used.
  13186.  
  13187.                                    Some causes for this error include the
  13188.                                    following:
  13189.  
  13190.                                    ■ An _interrupt function explicitly
  13191.                                    declared as near. Interrupt functions
  13192.                                    must
  13193.                                    be far.
  13194.  
  13195.                                    ■ An _interrupt function or a function
  13196.                                    with a variable number of arguments,
  13197.                                    when that function is declared with the
  13198.                                    _fortran, _pascal, or _fastcall
  13199.                                    attribute. Functions declared with the
  13200.                                    _interrupt attribute or with a variable
  13201.                                    number of arguments must use the C
  13202.                                    calling conventions. Remove the
  13203.                                    _fortran, _pascal, or _fastcall
  13204.                                    attribute from the function declaration.
  13205.  
  13206.  Number                            Compilation Error Message
  13207.  ────────────────────────────────────────────────────────────────────────────
  13208.  C2218                             type in _based construct must be void
  13209.  
  13210.                                    The only type allowed within a _based
  13211.                                    construct is void.
  13212.  
  13213.  C2219                             syntax error : type qualifier must be
  13214.                                    after '*'
  13215.  
  13216.                                    Either const or volatile appeared where
  13217.                                    a type or qualifier is not allowed, as
  13218.                                    in
  13219.  
  13220.                                    int (const *p);
  13221.  
  13222.  C2220                             warning treated as error - no object
  13223.                                    file generated
  13224.  
  13225.                                    When the compiler option /WX is used,
  13226.                                    the first warning generated by the
  13227.                                    compiler causes this error message to be
  13228.                                    displayed.
  13229.  
  13230.                                    Either correct the condition that caused
  13231.                                    the warning, or compile at a lower
  13232.                                    warning level or without /WX.
  13233.  
  13234.  C2221                             '.' : left operand points to
  13235.                                    struct/union, use '->'
  13236.  
  13237.                                    The left operand of the member-selection
  13238.                                    (.) operator must be a struct/union type.
  13239.                                    It cannot be a pointer to a struct/union
  13240.                                    type.
  13241.  
  13242.                                    This error usually means that a '->'
  13243.                                    operator must be used.
  13244.  
  13245.  C2222                             '->' : left operand has struct/union
  13246.                                    type, use '.'
  13247.  
  13248.                                    The left operand of the '->' operator
  13249.                                    must be a pointer to a struct/union type.
  13250.                                    It cannot be a struct/union type.
  13251.  
  13252.                                    This error usually means that a
  13253.                                    member-selection (.) operator must be
  13254.                                    used.
  13255.  
  13256.  C2223                             left of '-> member' must point to
  13257.                                    struct/union
  13258.  
  13259.                                    The left operand of the '->' operator is
  13260.                                    not a pointer to a struct/union type.
  13261.  
  13262.                                    This error can occur when the left
  13263.                                    operand is an undefined variable.
  13264.                                    Undefined variables have type int.
  13265.  
  13266.  C2224                             left of '.member' must have struct/union
  13267.                                    type
  13268.  
  13269.                                    The left operand of the member-selection
  13270.                                    (.) operator is not a struct/union type.
  13271.  
  13272.                                    This error can occur when the left
  13273.                                    operand is an undefined variable.
  13274.                                    Undefined variables have type int.
  13275.  
  13276.  Number                            Compilation Error Message
  13277.  ────────────────────────────────────────────────────────────────────────────
  13278.  C2225                             'tagname' : first member of struct is
  13279.                                    unnamed
  13280.  
  13281.                                    The struct with the given tag started
  13282.                                    with an unnamed member (an alignment
  13283.                                    member). All struct definitions must
  13284.                                    start with a named member.
  13285.  
  13286.  C2400                             in-line syntax error in 'context', found
  13287.                                    'token'
  13288.  
  13289.                                    The given token caused a syntax error
  13290.                                    within the given context.
  13291.  
  13292.  C2401                             'identifier' : register must be base in
  13293.                                    'context'
  13294.  
  13295.                                    The register used within an indirect
  13296.                                    memory operand must be a base register
  13297.                                    in this context.
  13298.  
  13299.  C2402                             'identifier' : register must be index in
  13300.                                    'context'
  13301.  
  13302.                                    The register used within an indirect
  13303.                                    memory operand must be an index register
  13304.                                    in this context.
  13305.  
  13306.  C2403                             'identifier' : register must be
  13307.                                    base/index in 'context'
  13308.  
  13309.                                    The register used within an indirect
  13310.                                    memory operand must be either a base or
  13311.                                    index register in this context.
  13312.  
  13313.  C2404                             'identifier' : illegal register in '
  13314.                                    context'
  13315.  
  13316.                                    This register in this context is illegal.
  13317.  
  13318.  C2405                             illegal short forward reference with
  13319.                                    offset
  13320.  
  13321.                                    Short forward references must refer only
  13322.                                    to a label. An additional offset cannot
  13323.                                    be used.
  13324.  
  13325.  C2406                             'identifier' : name undefined in '
  13326.                                    context'
  13327.  
  13328.                                    The identifier used with the SIZE or
  13329.                                    LENGTH operator, or as a specifier with
  13330.                                    the member-selection operator (.), was
  13331.                                    not defined.
  13332.  
  13333.  C2407                             illegal float register in 'context'
  13334.  
  13335.                                    An NDP register was specified in an
  13336.                                    illegal context.
  13337.  
  13338.  C2408                             illegal type on PTR operator in 'context
  13339.                                    '
  13340.  
  13341.                                    The first argument of the PTR operator
  13342.                                    was not a legal type specification.
  13343.  
  13344.  C2409                             illegal type used as operator in '
  13345.                                    context'
  13346.  
  13347.                                    A type was used within the given context
  13348.                                    as an operator.
  13349.  
  13350.  Number                            Compilation Error Message
  13351.  ────────────────────────────────────────────────────────────────────────────
  13352.  C2410                             'identifier' : ambiguous member name in
  13353.                                    'context'
  13354.  
  13355.                                    The given identifier within the given
  13356.                                    context is a member of more than one
  13357.                                    structure or union.
  13358.  
  13359.                                    Use a struct/union specifier in the
  13360.                                    operand that caused the error. A struct/
  13361.                                    union specifier is an identifier with
  13362.                                    structure or union type, either a
  13363.                                    typedef name or a variable of the same
  13364.                                    type as the structure or union being
  13365.                                    referenced. The specifier token must be
  13366.                                    the left operand of the first
  13367.                                    member-selection (.) operator on the
  13368.                                    operand.
  13369.  
  13370.  C2411                             'identifier' : illegal struct/union
  13371.                                    member in 'context'
  13372.  
  13373.                                    Either the given identifier used with
  13374.                                    this context is not a member of a
  13375.                                    visible structure or union, or the
  13376.                                    identifier is not a member of the
  13377.                                    structure or union specified with the
  13378.                                    member-selection (.) operator.
  13379.  
  13380.  C2412                             'identifier' : case insensitive label
  13381.                                    redefined
  13382.  
  13383.                                    The given label was defined more than
  13384.                                    once within the current function. Change
  13385.                                    the spelling of the label and its
  13386.                                    references.
  13387.  
  13388.  C2413                             'token' : illegal align size
  13389.  
  13390.                                    The alignment size used with the ALIGN
  13391.                                    directive was either missing or outside
  13392.                                    the valid range.
  13393.  
  13394.  C2414                             illegal number of operands
  13395.  
  13396.                                    The operating code does not support the
  13397.                                    number of operands used.
  13398.  
  13399.                                    Check an assembly reference manual to
  13400.                                    determine the correct number of operands
  13401.                                    for this instruction.
  13402.  
  13403.                                    It is possible that the instruction is
  13404.                                    supported with a different number of
  13405.                                    operands on a later processor. The
  13406.                                    problem can be solved by compiling with
  13407.                                    the /G1 or /G2 option, but then only
  13408.                                    machines with the newer processor will
  13409.                                    be able to execute the extended
  13410.                                    instruction.
  13411.  
  13412.  C2415                             improper operand type
  13413.  
  13414.                                    The operating code does not use operands
  13415.                                    of this type.
  13416.  
  13417.                                    Check an assembly reference manual to
  13418.                                    determine the correct types of operands
  13419.                                    for this instruction.
  13420.  
  13421.                                    It is possible that the instruction is
  13422.                                    supported with additional operand types
  13423.                                    on a later processor. The problem can be
  13424.                                    solved by compiling with the /G1 or /G2
  13425.                                    option, but then only machines with the
  13426.                                    newer processor will be able to execute
  13427.                                    the extended instruction.
  13428.  
  13429.  Number                            Compilation Error Message
  13430.  ────────────────────────────────────────────────────────────────────────────
  13431.  C2416                             'identifier' : illegal opcode for
  13432.                                    processor
  13433.  
  13434.                                    The instruction is legal on a later
  13435.                                    processor but not on the current
  13436.                                    processor.
  13437.  
  13438.                                    Check an assembly reference manual to
  13439.                                    determine which processors support this
  13440.                                    operating code.
  13441.  
  13442.                                    The problem can be solved by compiling
  13443.                                    with the /G1 or /G2 option, but then
  13444.                                    only machines with the newer processor
  13445.                                    will be able to execute the extended
  13446.                                    instruction.
  13447.  
  13448.  C2417                             divide by zero in 'context'
  13449.  
  13450.                                    The second argument to the division (/)
  13451.                                    operator used within the given context
  13452.                                    is zero.
  13453.  
  13454.  C2418                             'identifier' : not in a register
  13455.  
  13456.                                    An in-line assembler instruction
  13457.                                    referenced a variable with register
  13458.                                    storage class that has not actually been
  13459.                                    allocated in a register.
  13460.  
  13461.                                    To correct this, remove the register
  13462.                                    keyword from the variable definition,
  13463.                                    and make sure that this instruction is
  13464.                                    legal with a memory operand.
  13465.  
  13466.  C2419                             mod by zero in 'context'
  13467.  
  13468.                                    The second argument to the MOD operator
  13469.                                    used within the given context is zero.
  13470.  
  13471.  C2420                             'identifier' : illegal symbol in '
  13472.                                    context'
  13473.  
  13474.                                    The given identifier is illegal within
  13475.                                    the given context.
  13476.  
  13477.  C2421                             PTR operator used with register in '
  13478.                                    context'
  13479.  
  13480.                                    The PTR operator must not be used with a
  13481.                                    register operand.
  13482.  
  13483.  C2422                             illegal segment override in 'context'
  13484.  
  13485.                                    An illegal segment override was used
  13486.                                    within the given context.
  13487.  
  13488.  C2424                             'token' : improper expression in '
  13489.                                    context'
  13490.  
  13491.                                    The given token was used to form an
  13492.                                    improper expression within the given
  13493.                                    context.
  13494.  
  13495.  C2425                             'token' : nonconstant expression in '
  13496.                                    context'
  13497.  
  13498.                                    The given token was used to form a
  13499.                                    nonconstant expression within the given
  13500.                                    context.
  13501.  
  13502.  Number                            Compilation Error Message
  13503.  ────────────────────────────────────────────────────────────────────────────
  13504.  C2426                             'token' : illegal operator in 'context'
  13505.  
  13506.                                    The given token must not be used as an
  13507.                                    operator within the given context. For
  13508.                                    example, index operators may not be
  13509.                                    nested.
  13510.  
  13511.  C2427                             'identifier' : jump referencing label is
  13512.                                    out of range
  13513.  
  13514.                                    A branch to the specified label is
  13515.                                    farther than allowed.
  13516.  
  13517.                                    For example, if the following condition
  13518.                                    causes this error:
  13519.  
  13520.                                                        jz label1
  13521.                                                        inc AX
  13522.                                     .
  13523.                                     .
  13524.                                     .
  13525.                                                label1: inc CX
  13526.  
  13527.                                    then the error can be corrected by
  13528.                                    either removing excess code between the
  13529.                                    branch and the label or inverting the
  13530.                                    jump, as in
  13531.  
  13532.                                            jnz label2
  13533.                                            jmp label1
  13534.                                    label2: inc AX
  13535.                                    .
  13536.                                    .
  13537.                                    .
  13538.                                    label1: inc CX
  13539.  
  13540.  C2429                             'label' : illegal far label reference
  13541.  
  13542.                                    FAR PTR may not be used on jumps or
  13543.                                    calls to labels. Far references to
  13544.                                    functions are allowed as long as the
  13545.                                    function has been declared.
  13546.  
  13547.  
  13548.  D.1.3  Warning Messages
  13549.  
  13550.  The messages listed in this section indicate potential problems but do not
  13551.  hinder compiling and linking. The number in parentheses at the end of a
  13552.  warning message description gives the minimum warning level that must be set
  13553.  for the message to appear.
  13554.  
  13555.  Number                            Warning Message
  13556.  ────────────────────────────────────────────────────────────────────────────
  13557.  C4000                             UNKNOWN WARNING Contact Microsoft
  13558.                                    Product Support Services
  13559.  
  13560.                                    The compiler detected an unknown error
  13561.                                    condition.
  13562.  
  13563.                                    Note the circumstances of the error and
  13564.                                    notify Microsoft Corporation by
  13565.                                    following the instructions in the
  13566.                                    Microsoft Product Assistance Request
  13567.                                    form at the back of C for Yourself,
  13568.                                    included in the QuickC version 2.5
  13569.                                    package. (1)
  13570.  
  13571.  C4001                             nonstandard extension used - 'extension'
  13572.  
  13573.                                    The given nonstandard language extension
  13574.                                    was used when the /Ze option was
  13575.                                    specified.
  13576.  
  13577.                                    If the /Za option has been specified,
  13578.                                    this condition generates a syntax error.
  13579.                                    (1,4)
  13580.  
  13581.  C4002                             too many actual parameters for macro '
  13582.                                    identifier'
  13583.  
  13584.                                    The number of actual arguments specified
  13585.                                    with the given identifier was greater
  13586.                                    than the number of formal parameters
  13587.                                    given in the macro definition of the
  13588.                                    identifier.
  13589.  
  13590.                                    The additional actual parameters are
  13591.                                    collected but ignored during expansion
  13592.                                    of the macro. (1)
  13593.  
  13594.  C4003                             not enough actual parameters for macro '
  13595.                                    identifier'
  13596.  
  13597.                                    The number of actual arguments specified
  13598.                                    with the given identifier was less than
  13599.                                    the number of formal parameters given in
  13600.                                    the macro definition of the identifier.
  13601.  
  13602.                                    When a formal parameter is referenced in
  13603.                                    the definition and the corresponding
  13604.                                    actual parameter has not been provided,
  13605.                                    empty text is substituted in the macro
  13606.                                    expansion. (1)
  13607.  
  13608.  C4004                             missing ')' after 'defined'
  13609.  
  13610.                                    The closing parenthesis was missing from
  13611.                                    an #if defined phrase.
  13612.  
  13613.                                    The compiler assumes a right parenthesis,
  13614.                                    after the first identifier it finds. It
  13615.                                    then attempts to compile the remainder
  13616.                                    of the line, which may result in another
  13617.                                    warning or error. (1)
  13618.  
  13619.                                    The following example causes this
  13620.                                    warning and a fatal error:
  13621.  
  13622.                                    #if defined( ID1 ) || ( ID2 )
  13623.  
  13624.                                    The compiler assumed a right parenthesis
  13625.                                    after ID1, then found a mismatched
  13626.                                    parenthesis in the remainder of the line.
  13627.                                    The following avoids this problem:
  13628.  
  13629.                                    #if defined( ID1 ) || defined( ID2 )
  13630.  
  13631.  Number                            Warning Message
  13632.  ────────────────────────────────────────────────────────────────────────────
  13633.  C4005                             'identifier' : macro redefinition
  13634.  
  13635.                                    The given identifier was defined twice.
  13636.                                    The compiler assumed the new macro
  13637.                                    definition.
  13638.  
  13639.                                    To eliminate the warning, either remove
  13640.                                    one of the definitions or use an #undef
  13641.                                    directive before the second definition.
  13642.  
  13643.                                    This warning is caused in situations
  13644.                                    where a macro is defined both on the
  13645.                                    command line and in the code with a
  13646.                                    #define directive. (1)
  13647.  
  13648.  C4006                             #undef expected an identifier
  13649.  
  13650.                                    The name of the identifier whose
  13651.                                    definition was to be removed was not
  13652.                                    given with the #undef directive. The
  13653.                                    #undef was ignored. (1)
  13654.  
  13655.  C4007                             'identifier' : must be 'attribute'
  13656.  
  13657.                                    The attribute of the given function was
  13658.                                    not explicitly stated. The compiler
  13659.                                    forced the attribute.
  13660.  
  13661.                                    For example, the function main must have
  13662.                                    the _cdecl attribute. (2)
  13663.  
  13664.  C4008                             'identifier' : _fastcall attribute on
  13665.                                    data ignored
  13666.  
  13667.                                    The _fastcall attribute on the given
  13668.                                    data identifier was ignored. (2)
  13669.  
  13670.  C4009                             string too big, trailing characters
  13671.                                    truncated
  13672.  
  13673.                                    A string exceeded the compiler limit of
  13674.                                    2,047 on string size. The excess
  13675.                                    characters at the end of the string were
  13676.                                    truncated.
  13677.  
  13678.                                    To correct this problem, break the
  13679.                                    string into two or more strings. (1)
  13680.  
  13681.  C4011                             identifier truncated to 'identifier'
  13682.  
  13683.                                    Only the first 31 characters of an
  13684.                                    identifier are significant. The
  13685.                                    characters after the limit were
  13686.                                    truncated.
  13687.  
  13688.                                    This may mean that two identifiers that
  13689.                                    are different before truncation may have
  13690.                                    the same identifier name after
  13691.                                    truncation. (1)
  13692.  
  13693.  C4015                             'identifier' : bit-field type must be
  13694.                                    integral
  13695.  
  13696.                                    The given bit field was not declared as
  13697.                                    an integral type. The compiler assumed
  13698.                                    the base type of the bit field to be
  13699.                                    unsigned.
  13700.  
  13701.                                    Bit fields must be declared as unsigned
  13702.                                    integral types. (1)
  13703.  
  13704.  Number                            Warning Message
  13705.  ────────────────────────────────────────────────────────────────────────────
  13706.  C4016                             'function' : no function return type,
  13707.                                    using int as default
  13708.  
  13709.                                    The given function had not yet been
  13710.                                    declared or defined, so the return type
  13711.                                    was unknown. A default return type of
  13712.                                    int was assumed. (3)
  13713.  
  13714.  C4017                             cast of int expression to far pointer
  13715.  
  13716.                                    A far pointer represents a full
  13717.                                    segmented address. On an 8086/8088
  13718.                                    processor, casting an int value to a far
  13719.                                    pointer may produce an address with a
  13720.                                    meaningless segment value.
  13721.  
  13722.                                    The compiler extended the int expression
  13723.                                    to a four-byte value. (1)
  13724.  
  13725.  C4020                             'function' : too many actual parameters
  13726.  
  13727.                                    The number of arguments specified in a
  13728.                                    function call was greater than the
  13729.                                    number of parameters specified in the
  13730.                                    function prototype or function
  13731.                                    definition.
  13732.  
  13733.                                    The extra parameters were passed
  13734.                                    according to the calling convention used
  13735.                                    on the function. (1)
  13736.  
  13737.  C4021                             'function' : too few actual parameters
  13738.  
  13739.                                    The number of arguments specified in a
  13740.                                    function call was less than the number
  13741.                                    of parameters specified in the function
  13742.                                    prototype or function definition.
  13743.  
  13744.                                    Only the provided actual parameters are
  13745.                                    passed. If the called function
  13746.                                    references a variable that has not been
  13747.                                    passed, the results are undefined and
  13748.                                    may be unexpected. (1)
  13749.  
  13750.  C4022                             'function' : pointer mismatch :
  13751.                                    parameter 'number'
  13752.  
  13753.                                    The pointer type of the given parameter
  13754.                                    was different from the pointer type
  13755.                                    specified in the argument-type list or
  13756.                                    function definition.
  13757.  
  13758.                                    The parameter will be passed without
  13759.                                    change. Its value will be interpreted as
  13760.                                    a pointer within the called function. (1)
  13761.  
  13762.  C4023                             'function' : _based pointer passed to
  13763.                                    unprototyped function: parameter 'number
  13764.                                    '
  13765.  
  13766.                                    When in a near data model, only the
  13767.                                    offset portion of a _based pointer is
  13768.                                    passed to an unprototyped function. If
  13769.                                    the function expects a far pointer, the
  13770.                                    resulting code will be wrong. In any
  13771.                                    data model, if the function is defined
  13772.                                    to take a _based pointer with a
  13773.                                    different base, the resulting code may
  13774.                                    be unpredictable.
  13775.  
  13776.                                    If a prototype is used before the call,
  13777.                                    the call will be generated correctly. (1)
  13778.  
  13779.  Number                            Warning Message
  13780.  ────────────────────────────────────────────────────────────────────────────
  13781.  C4024                             'function' : different types : parameter
  13782.                                    'number'
  13783.  
  13784.                                    The type of the given parameter in a
  13785.                                    function call did not agree with the
  13786.                                    type given in the argument-type list or
  13787.                                    function definition.
  13788.  
  13789.                                    The parameter will be passed without
  13790.                                    change. The function will interpret the
  13791.                                    parameter's type as the type expected by
  13792.                                    the function. (1)
  13793.  
  13794.  C4026                             function declared with formal argument
  13795.                                    list
  13796.  
  13797.                                    The function was declared to take
  13798.                                    arguments, but the function definition
  13799.                                    did not declare formal parameters.
  13800.  
  13801.                                    Subsequent calls to this function will
  13802.                                    assume the function takes no arguments.
  13803.                                    (1)
  13804.  
  13805.  C4027                             function declared without formal
  13806.                                    argument list
  13807.  
  13808.                                    The function was declared to take no
  13809.                                    arguments (the argument-type list
  13810.                                    consisted of the word void), but formal
  13811.                                    parameters were declared in the function
  13812.                                    definition, or arguments were given in a
  13813.                                    call to the function. Subsequent calls
  13814.                                    to this function will assume the
  13815.                                    function takes parameters of the types
  13816.                                    of the given formal arguments. (1)
  13817.  
  13818.  C4028                             parameter 'number' declaration different
  13819.  
  13820.                                    The type of the given parameter did not
  13821.                                    agree with the corresponding type in the
  13822.                                    argument-type list or with the
  13823.                                    corresponding formal parameter.
  13824.  
  13825.                                    The original declaration was used. (1)
  13826.  
  13827.  C4029                             declared parameter list different from
  13828.                                    definition
  13829.  
  13830.                                    The types in the argument list given in
  13831.                                    a function declaration did not agree
  13832.                                    with the types of the formal parameters
  13833.                                    given in the function definition.
  13834.  
  13835.                                    The parameter list of the definition is
  13836.                                    used instead of the parameter list of
  13837.                                    the declaration. (1)
  13838.  
  13839.  C4030                             first parameter list longer than the
  13840.                                    second
  13841.  
  13842.                                    A function was declared more than once
  13843.                                    with different parameter lists.
  13844.  
  13845.                                    The first declaration was used. (1)
  13846.  
  13847.  C4031                             second parameter list is longer than the
  13848.                                    first
  13849.  
  13850.                                    A function was declared more than once
  13851.                                    with different parameter lists.
  13852.  
  13853.                                    The first declaration was used. (1)
  13854.  
  13855.  Number                            Warning Message
  13856.  ────────────────────────────────────────────────────────────────────────────
  13857.  C4032                             unnamed struct/union as parameter
  13858.  
  13859.                                    The type of the structure or union being
  13860.                                    passed as an argument was not named, so
  13861.                                    the declaration of the formal parameter
  13862.                                    cannot use the name and must declare the
  13863.                                    type.
  13864.  
  13865.                                    The parameter was commented out.
  13866.  
  13867.                                    This warning occurs only when using the
  13868.                                    /Zg option for generating function
  13869.                                    prototypes. (1)
  13870.  
  13871.  C4033                             function must return a value
  13872.  
  13873.                                    A function is expected to return a value
  13874.                                    unless it is declared as void.
  13875.  
  13876.                                    An undefined value will be returned when
  13877.                                    this function is called. (1)
  13878.  
  13879.  C4034                             sizeof returns 0
  13880.  
  13881.                                    The sizeof operator was applied to an
  13882.                                    operand that yielded a size of zero.
  13883.  
  13884.                                    This warning is informational. (1)
  13885.  
  13886.  C4035                             'function' : no return value
  13887.  
  13888.                                    A function declared to return a value
  13889.                                    did not do so.
  13890.  
  13891.                                    An undefined value will be returned when
  13892.                                    this function is called. (3)
  13893.  
  13894.  C4040                             memory attribute on 'identifier' ignored
  13895.  
  13896.                                    The _near, _far, _huge, or _based
  13897.                                    keyword has no effect in the declaration
  13898.                                    of the given identifier and is ignored.
  13899.  
  13900.                                    One cause of this warning is a huge
  13901.                                    array that is not declared globally.
  13902.                                    Declare huge arrays outside of main. (1)
  13903.  
  13904.  C4042                             'identifier' : has bad storage class
  13905.  
  13906.                                    The storage class specified for
  13907.                                    identifier cannot be used in this
  13908.                                    context. (1)
  13909.  
  13910.                                    The default storage class for this
  13911.                                    context was used in place of the illegal
  13912.                                    class:
  13913.  
  13914.                                    ■ If identifier was a function, the
  13915.                                    compiler assumed extern class.
  13916.  
  13917.                                    ■ If identifier was a formal parameter
  13918.                                    or local variable, the compiler assumed
  13919.                                    auto class.
  13920.  
  13921.                                    ■ If identifier was a global variable,
  13922.                                    the compiler assumed the variable was
  13923.                                    declared with no storage class.
  13924.  
  13925.  Number                            Warning Message
  13926.  ────────────────────────────────────────────────────────────────────────────
  13927.  C4044                             _huge on 'identifier' ignored, must be
  13928.                                    an array
  13929.  
  13930.                                    The compiler ignored the _huge memory
  13931.                                    attribute on the given identifier. Only
  13932.                                    arrays may be declared with the _huge
  13933.                                    memory attribute. On pointers, _huge
  13934.                                    must be used as a modifier, not as a
  13935.                                    memory attribute. (1)
  13936.  
  13937.  C4045                             'identifier' : array bounds overflow
  13938.  
  13939.                                    Too many initializers were present for
  13940.                                    the given array. The excess initializers
  13941.                                    were ignored. (1)
  13942.  
  13943.  C4047                             'operator' : different levels of
  13944.                                    indirection
  13945.  
  13946.                                    An expression involving the specified
  13947.                                    operator had inconsistent levels of
  13948.                                    indirection.
  13949.  
  13950.                                    If both operands are of arithmetic type,
  13951.                                    or if both are not (such as array or
  13952.                                    pointer), then they are used without
  13953.                                    change. If one is near and one is far,
  13954.                                    the near operand is extended using the
  13955.                                    value of DS. If one is arithmetic and
  13956.                                    one is not, the arithmetic operand is
  13957.                                    converted to the type of the other
  13958.                                    operand. (1)
  13959.  
  13960.                                    For example, the following code causes
  13961.                                    this warning but is compiled without
  13962.                                    change:
  13963.  
  13964.                                    char **p;
  13965.                                    char *q;
  13966.                                    p = q;   /* Warning */
  13967.  
  13968.  C4048                             array's declared subscripts different
  13969.  
  13970.                                    An expression involved pointers to
  13971.                                    arrays of different size.
  13972.  
  13973.                                    The pointers were used without
  13974.                                    conversion. (1)
  13975.  
  13976.  C4049                             'operator' : indirection to different
  13977.                                    types
  13978.  
  13979.                                    The pointer expressions used with the
  13980.                                    given operator had different base types.
  13981.                                    The expressions were used without
  13982.                                    conversion. (1)
  13983.  
  13984.                                    For example, the following code causes
  13985.                                    this warning:
  13986.  
  13987.                                    struct ts1 *s1;
  13988.                                    struct ts2 *s2;
  13989.                                    s2 = s1;   /* Warning */
  13990.  
  13991.  C4050                             'operator' : different code attributes
  13992.  
  13993.                                    The function-pointer expressions used
  13994.                                    with operator had different code
  13995.                                    attributes. The attribute involved is
  13996.                                    either _export or_loadds.
  13997.  
  13998.                                    This is a warning and not an error,
  13999.                                    because _export and _loadds affect only
  14000.                                    entry sequences and not calling
  14001.                                    conventions. (4)
  14002.  
  14003.  Number                            Warning Message
  14004.  ────────────────────────────────────────────────────────────────────────────
  14005.  C4051                             type conversion, possible loss of data
  14006.  
  14007.                                    Two data items in an expression had
  14008.                                    different base types, causing the type
  14009.                                    of one item to be converted. During the
  14010.                                    conversion, a data item was truncated.
  14011.                                    (2)
  14012.  
  14013.  C4053                             at least one void operand
  14014.  
  14015.                                    An expression with type void was used as
  14016.                                    an operand.
  14017.  
  14018.                                    The expression was evaluated using an
  14019.                                    undefined value for the void operand. (1)
  14020.  
  14021.  C4054                             insufficient memory may affect
  14022.                                    optimization
  14023.  
  14024.                                    Not enough memory was available to do
  14025.                                    all requested optimizations. This
  14026.                                    message appears if available memory is
  14027.                                    within 64K of the absolute minimum that
  14028.                                    will accommodate the executable file. (1)
  14029.  
  14030.  C4056                             floating-point overflow
  14031.  
  14032.                                    The compiler generated a floating-point
  14033.                                    exception while doing constant
  14034.                                    arithmetic on floating-point items at
  14035.                                    compile time. (2)
  14036.  
  14037.                                    For example:
  14038.  
  14039.                                    float fp_val = 1.0e100;
  14040.  
  14041.                                    In this example, the floating-point
  14042.                                    constant  1.0e100  exceeds the maximum
  14043.                                    allowable value for a double-precision
  14044.                                    data item.
  14045.  
  14046.  C4058                             address of automatic (local) variable
  14047.                                    taken, DS!= SS
  14048.  
  14049.                                    The program was compiled with the
  14050.                                    default data segment (DS) not equal to
  14051.                                    the stack segment (SS), and the program
  14052.                                    tried to point to an automatic (local)
  14053.                                    variable with a near pointer.
  14054.  
  14055.                                    Dereferencing a pointer to that address
  14056.                                    will give an unpredictable result. (1)
  14057.  
  14058.  C4059                             segment lost in conversion
  14059.  
  14060.                                    The conversion of a far pointer (a full
  14061.                                    segmented address) or _based pointer to
  14062.                                    a near pointer (a segment offset) or
  14063.                                    _based pointer resulted in the loss of
  14064.                                    the segment address. (2)
  14065.  
  14066.  C4061                             long/short mismatch in argument :
  14067.                                    conversion supplied
  14068.  
  14069.                                    The base types of the actual and formal
  14070.                                    arguments of a function were different.
  14071.                                    The actual argument is converted to the
  14072.                                    type of the formal parameter. (1)
  14073.  
  14074.  C4062                             near/far mismatch in argument :
  14075.                                    conversion supplied
  14076.  
  14077.                                    The pointer sizes of the actual and
  14078.                                    formal arguments of a function were
  14079.                                    different. The actual argument is
  14080.                                    converted to the type of the formal
  14081.                                    parameter. (1)
  14082.  
  14083.  Number                            Warning Message
  14084.  ────────────────────────────────────────────────────────────────────────────
  14085.  C4063                             'function' : function too large for
  14086.                                    post-optimizer
  14087.  
  14088.                                    Not enough space was available to
  14089.                                    optimize the given function. (2)
  14090.  
  14091.                                    One of the following may be a solution:
  14092.  
  14093.                                    ■ Recompile with fewer optimizations.
  14094.  
  14095.                                    ■ Divide the function into two or more
  14096.                                    smaller functions.
  14097.  
  14098.  C4065                             recoverable heap overflow in
  14099.                                    post-optimizer - some optimizations may
  14100.                                    be missed
  14101.  
  14102.                                    Some optimizations were skipped because
  14103.                                    not enough space was available for
  14104.                                    optimization. (2)
  14105.  
  14106.                                    One of the following may be a solution:
  14107.  
  14108.                                    ■ Recompile with fewer optimizations.
  14109.  
  14110.                                    ■ Divide the function into two or more
  14111.                                    smaller functions.
  14112.  
  14113.  C4066                             local symbol-table overflow - some local
  14114.                                    symbols may be missing in listings
  14115.  
  14116.                                    The listing generator ran out of heap
  14117.                                    space for local variables, so the source
  14118.                                    listing may not contain symbol-table
  14119.                                    information for all local variables. (2)
  14120.  
  14121.  C4067                             unexpected characters following '
  14122.                                    directive' directive - newline expected
  14123.  
  14124.                                    Extra characters following a
  14125.                                    preprocessor directive were ignored.
  14126.                                    This warning appears only when compiling
  14127.                                    with the /Za option. (1)
  14128.  
  14129.                                    For example, the following code causes
  14130.                                    this warning:
  14131.  
  14132.                                    #endif    NO_EXT_KEYS
  14133.  
  14134.                                    To remove the warning, compile with /Ze
  14135.                                    or use comment delimiters:
  14136.  
  14137.                                    #endif    /* NO_EXT_KEYS */
  14138.  
  14139.  C4068                             unknown pragma
  14140.  
  14141.                                    The compiler did not recognize a pragma
  14142.                                    and ignored it. (1)
  14143.  
  14144.  C4069                             conversion of near pointer to long
  14145.                                    integer
  14146.  
  14147.                                    The compiler converted a 16-bit near
  14148.                                    pointer to a long integer by extending
  14149.                                    the high-order word with the current
  14150.                                    data-segment value, not with zeros. (2)
  14151.  
  14152.  Number                            Warning Message
  14153.  ────────────────────────────────────────────────────────────────────────────
  14154.  C4071                             'function' : no function prototype given
  14155.  
  14156.                                    The given function was called before the
  14157.                                    compiler found the corresponding
  14158.                                    function prototype.
  14159.  
  14160.                                    The function will be called using the
  14161.                                    default rules for calling a function
  14162.                                    without a prototype. (2)
  14163.  
  14164.  C4072                             'function' : no function prototype on
  14165.                                    _fastcall function
  14166.  
  14167.                                    A _fastcall function was called without
  14168.                                    first being prototyped.
  14169.  
  14170.                                    Functions that are _fastcall should be
  14171.                                    prototyped to guarantee that the
  14172.                                    registers assigned at each point of call
  14173.                                    are the same as the registers assumed
  14174.                                    when the function is defined. A function
  14175.                                    defined in the new ANSI style is a
  14176.                                    prototype.
  14177.  
  14178.                                    A prototype must be added when this
  14179.                                    warning appears, unless the function
  14180.                                    takes no arguments or takes only
  14181.                                    arguments that cannot be passed in the
  14182.                                    general-purpose registers. (1)
  14183.  
  14184.  C4073                             scoping too deep, deepest scoping merged
  14185.                                    when debugging
  14186.  
  14187.                                    Declarations appeared at a static
  14188.                                    nesting level greater than 13. As a
  14189.                                    result, all declarations beyond this
  14190.                                    level will seem to appear at the same
  14191.                                    level. (1)
  14192.  
  14193.  C4076                             'type' : may be used on integral types
  14194.                                    only
  14195.  
  14196.                                    The signed or unsigned type modifier was
  14197.                                    used with a nonintegral type. The given
  14198.                                    qualifier was ignored. (1)
  14199.  
  14200.                                    The following example causes this
  14201.                                    warning:
  14202.  
  14203.                                    unsigned double x;
  14204.  
  14205.  C4077                             unknown check_stack option
  14206.  
  14207.                                    An unknown option was given with the old
  14208.                                    form of the check_stack pragma. With the
  14209.                                    old form, the argument to the pragma
  14210.                                    must be empty, +, or -. (1)
  14211.  
  14212.                                    For example, the following causes this
  14213.                                    warning:
  14214.  
  14215.                                    #pragma check_stack yes
  14216.  
  14217.                                    The following code corrects this
  14218.                                    situation:
  14219.  
  14220.                                    #pragma check_stack +    /* Old form */
  14221.  
  14222.  
  14223.                                    or
  14224.  
  14225.                                    #pragma check_stack (on) /* New form */
  14226.  
  14227.  Number                            Warning Message
  14228.  ────────────────────────────────────────────────────────────────────────────
  14229.  C4078                             case constant 'value' too big for the
  14230.                                    type of switch expression
  14231.  
  14232.                                    A value appearing in a case statement
  14233.                                    was larger than the size of the type in
  14234.                                    the switch expression. The compiler
  14235.                                    converted the case value to the type of
  14236.                                    the switch expression.
  14237.  
  14238.                                    A problem can occur when two case
  14239.                                    constants have different values before
  14240.                                    being cast but the same value afterward.
  14241.                                    (1)
  14242.  
  14243.  C4079                             unexpected token 'token'
  14244.  
  14245.                                    An unexpected separator token was found
  14246.                                    in the argument list of a pragma.
  14247.  
  14248.                                    The remainder of the pragma was ignored.
  14249.                                    (1)
  14250.  
  14251.  C4080                             expected identifier for segment name,
  14252.                                    found 'token'
  14253.  
  14254.                                    The first argument in the argument list
  14255.                                    for the alloc_text pragma is missing a
  14256.                                    segment name. This happens if the first
  14257.                                    token in the argument list is not an
  14258.                                    identifier.
  14259.  
  14260.                                    The pragma was ignored. (1)
  14261.  
  14262.  C4081                             expected a comma, found 'token'
  14263.  
  14264.                                    A comma was missing between two
  14265.                                    arguments of a pragma.
  14266.  
  14267.                                    The pragma was ignored. (1)
  14268.  
  14269.  C4082                             expected an identifier, found 'token'
  14270.  
  14271.                                    An identifier was missing from the
  14272.                                    argument list.
  14273.  
  14274.                                    The remainder of the pragma was ignored.
  14275.                                    (1)
  14276.  
  14277.  C4083                             expected '(', found 'token'
  14278.  
  14279.                                    A left parenthesis was missing from a
  14280.                                    pragma's argument list.
  14281.  
  14282.                                    The pragma was ignored. (1)
  14283.  
  14284.                                    The following example causes this
  14285.                                    warning:
  14286.  
  14287.                                    #pragma check_pointer on)
  14288.  
  14289.  C4084                             expected a pragma keyword, found 'token'
  14290.  
  14291.                                    The token following #pragma was not
  14292.                                    recognized as a directive.
  14293.  
  14294.                                    The pragma was ignored. (1)
  14295.  
  14296.  Number                            Warning Message
  14297.  ────────────────────────────────────────────────────────────────────────────
  14298.  C4084                             (continued)
  14299.  
  14300.                                    The following example causes this
  14301.                                    warning:
  14302.  
  14303.                                    #pragma (on)
  14304.  
  14305.  C4085                             expected [on | off]
  14306.  
  14307.                                    The pragma expected an on or off
  14308.                                    parameter, but the specified parameter
  14309.                                    was unrecognized or missing.
  14310.  
  14311.                                    The pragma was ignored. (1)
  14312.  
  14313.  C4086                             expected [1 | 2 | 4]
  14314.  
  14315.                                    The pragma expected a parameter of
  14316.                                    either 1, 2, or 4, but the specifed
  14317.                                    parameter was unrecognized or missing.
  14318.                                    (1)
  14319.  
  14320.  C4087                             'function' : declared with void
  14321.                                    parameter list
  14322.  
  14323.                                    The given function was declared as
  14324.                                    taking no parameters, but a call to the
  14325.                                    function specified actual parameters.
  14326.  
  14327.                                    The extra parameters were passed
  14328.                                    according to the calling convention used
  14329.                                    on the function. (1)
  14330.  
  14331.                                    The following example causes this
  14332.                                    warning:
  14333.  
  14334.                                    int f1(void);
  14335.                                        f1(10);
  14336.  
  14337.  C4088                             'function' : pointer mismatch :
  14338.                                    parameter 'number', parameter list '
  14339.                                    number'
  14340.  
  14341.                                    The argument passed to the given
  14342.                                    function had a different level of
  14343.                                    indirection from the given parameter in
  14344.                                    the function definition.
  14345.  
  14346.                                    The parameter will be passed without
  14347.                                    change. Its value will be interpreted as
  14348.                                    a pointer within the called function. (1)
  14349.  
  14350.  C4089                             'function' : different types : parameter
  14351.                                    'number', parameter list 'number'
  14352.  
  14353.                                    The argument passed to the given
  14354.                                    function did not have the same type as
  14355.                                    the given parameter in the function
  14356.                                    definition.
  14357.  
  14358.                                    The parameter will be passed without
  14359.                                    change. The function will interpret the
  14360.                                    parameter's type as the type expected by
  14361.                                    the function. (1)
  14362.  
  14363.  Number                            Warning Message
  14364.  ────────────────────────────────────────────────────────────────────────────
  14365.  C4090                             different const/volatile qualifiers
  14366.  
  14367.                                    A pointer to an item declared as const
  14368.                                    was assigned to a pointer that was not
  14369.                                    declared as const. As a result, the
  14370.                                    const item pointed to could be modified
  14371.                                    without being detected.
  14372.  
  14373.                                    The expression was compiled without
  14374.                                    modification. (1)
  14375.  
  14376.                                    The following example causes this
  14377.                                    warning:
  14378.  
  14379.                                    const char *p = "abcde";
  14380.                                    int str(char *s);
  14381.                                    str(p);
  14382.  
  14383.  C4091                             no symbols were declared
  14384.  
  14385.                                    The compiler detected an empty
  14386.                                    declaration, as in the following
  14387.                                    example:
  14388.  
  14389.                                    int ;
  14390.  
  14391.                                    The declaration was ignored. (2)
  14392.  
  14393.  C4092                             untagged enum/struct/union declared no
  14394.                                    symbols
  14395.  
  14396.                                    The compiler detected an empty
  14397.                                    declaration using an untagged structure,
  14398.                                    union, or enumerated variable.
  14399.  
  14400.                                    The declaration was ignored. (2)
  14401.  
  14402.                                    For example, the following code causes
  14403.                                    this warning:
  14404.  
  14405.                                    struct {
  14406.                                     .
  14407.                                     .
  14408.                                     .
  14409.                                     };
  14410.  
  14411.  C4093                             unescaped newline in character constant
  14412.                                    in inactive code
  14413.  
  14414.                                    The constant expression of an #if, #elif,
  14415.                                    #ifdef, or #ifndef preprocessor
  14416.                                    directive evaluated to 0, making the
  14417.                                    code that follows inactive. Within that
  14418.                                    inactive code, a newline character
  14419.                                    appeared within a set of single or
  14420.                                    double quotation marks.
  14421.  
  14422.                                    All text until the next double quotation
  14423.                                    mark was considered to be within a
  14424.                                    character constant. (3)
  14425.  
  14426.  C4095                             expected ')', found 'token'
  14427.  
  14428.                                    More than one argument was given for a
  14429.                                    pragma that can take only one argument.
  14430.  
  14431.                                    The compiler assumed the expected
  14432.                                    parenthesis and ignored the remainder of
  14433.                                    the line. (1)
  14434.  
  14435.  Number                            Warning Message
  14436.  ────────────────────────────────────────────────────────────────────────────
  14437.  C4096                             'attribute1' must be used with '
  14438.                                    attribute2'
  14439.  
  14440.                                    The use of attribute2 requires the use
  14441.                                    of attribute1.
  14442.  
  14443.                                    For example, using a variable number of
  14444.                                    arguments (...) requires that _cdecl be
  14445.                                    used. Also, _interrupt functions must be
  14446.                                    _far and _cdecl.
  14447.  
  14448.                                    The compiler assumed attribute1 for the
  14449.                                    function. (2)
  14450.  
  14451.  C4098                             void function returning a value
  14452.  
  14453.                                    A function declared with a void return
  14454.                                    type also returned a value.
  14455.  
  14456.                                    A function was declared with a void
  14457.                                    return type but was defined as a value.
  14458.  
  14459.                                    The compiler assumed the function
  14460.                                    returns a value of type int. (1)
  14461.  
  14462.  C4100                             'identifier' : unreferenced formal
  14463.                                    parameter
  14464.  
  14465.                                    The given formal parameter was never
  14466.                                    referenced in the body of the function
  14467.                                    for which it was declared.
  14468.  
  14469.                                    This warning is informational. (3)
  14470.  
  14471.  C4101                             'identifier' : unreferenced local
  14472.                                    variable
  14473.  
  14474.                                    The given local variable was never used.
  14475.  
  14476.                                    This warning is informational. (4)
  14477.  
  14478.  C4102                             'label' : unreferenced label
  14479.  
  14480.                                    The given label was defined but never
  14481.                                    referenced.
  14482.  
  14483.                                    This warning is informational. (3)
  14484.  
  14485.  C4104                             'identifier' : near data in same_seg
  14486.                                    pragma, ignored
  14487.  
  14488.                                    The given near variable was specified in
  14489.                                    a same_seg pragma.
  14490.  
  14491.                                    The identifier was ignored. (1)
  14492.  
  14493.  C4105                             'identifier' : code modifiers only on
  14494.                                    function or pointer to function
  14495.  
  14496.                                    The given identifier was declared with a
  14497.                                    code modifier that can be used only with
  14498.                                    a function or function pointer.
  14499.  
  14500.                                    The code modifier was ignored. (1)
  14501.  
  14502.  Number                            Warning Message
  14503.  ────────────────────────────────────────────────────────────────────────────
  14504.  C4106                             pragma requires integer between 1 and
  14505.                                    127
  14506.  
  14507.                                    An integer constant in the range 1-127
  14508.                                    must be specified with the page and skip
  14509.                                    pragmas.
  14510.  
  14511.                                    The compiler assumed 1 was specified. (1)
  14512.  
  14513.  C4107                             pragma requires integer between 15 and
  14514.                                    255
  14515.  
  14516.                                    An integer constant in the range 15-255
  14517.                                    must be specified with the pagesize
  14518.                                    pragma.
  14519.  
  14520.                                    The compiler assumed 63 was specified.
  14521.                                    (1)
  14522.  
  14523.  C4108                             pragma requires integer between 79 and
  14524.                                    132
  14525.  
  14526.                                    An integer constant in the range 79-132
  14527.                                    must be specified with the linesize
  14528.                                    pragma.
  14529.  
  14530.                                    The compiler assumed 79 was specified.
  14531.                                    (1)
  14532.  
  14533.  C4109                             unexpected identifier 'identifier'
  14534.  
  14535.                                    The pragma contained an unexpected token.
  14536.  
  14537.                                    The pragma was ignored. (1)
  14538.  
  14539.  C4110                             unexpected token 'int constant'
  14540.  
  14541.                                    The pragma contained an unexpected
  14542.                                    integer constant.
  14543.  
  14544.                                    The pragma was ignored. (1)
  14545.  
  14546.  C4111                             unexpected token 'string'
  14547.  
  14548.                                    The pragma contained an unexpected
  14549.                                    string.
  14550.  
  14551.                                    The pragma was ignored. (1)
  14552.  
  14553.  C4112                             macro name 'name' is reserved, 'command'
  14554.                                    ignored
  14555.  
  14556.                                    The given command attempted to define or
  14557.                                    undefine the predefined macro name or
  14558.                                    the preprocessor operator 'defined'. The
  14559.                                    given command is displayed as either
  14560.                                    #define or #undef, even if the attempt
  14561.                                    was made using command-line options.
  14562.  
  14563.                                    The command was ignored. (1)
  14564.  
  14565.  C4113                             function parameter lists differed
  14566.  
  14567.                                    A function pointer was assigned to a
  14568.                                    function pointer, but the parameter
  14569.                                    lists of the functions do not agree.
  14570.  
  14571.                                    The expression was compiled without
  14572.                                    modification. (1)
  14573.  
  14574.  Number                            Warning Message
  14575.  ────────────────────────────────────────────────────────────────────────────
  14576.  C4114                             same type qualifier used more than once
  14577.  
  14578.                                    A type qualifier (const, volatile,
  14579.                                    signed, or unsigned) was used more than
  14580.                                    once in the same type.
  14581.  
  14582.                                    The second occurrence of the qualifier
  14583.                                    was ignored. (1)
  14584.  
  14585.  C4115                             'tag' : type definition in formal
  14586.                                    parameter list
  14587.  
  14588.                                    The given tag was used to define a
  14589.                                    struct, union, or enum in the formal
  14590.                                    parameter list of a function.
  14591.  
  14592.                                    The compiler assumed the definition was
  14593.                                    at the global level. (1)
  14594.  
  14595.  C4116                             (no tag) : type definition in formal
  14596.                                    parameter list
  14597.  
  14598.                                    A struct, union, or enum type with no
  14599.                                    tag was defined in the formal parameter
  14600.                                    list of a function.
  14601.  
  14602.                                    The compiler assumed the definition was
  14603.                                    at the global level. (1)
  14604.  
  14605.  C4118                             pragma not supported
  14606.  
  14607.                                    A pragma that the compiler does not
  14608.                                    support was used. The pragma was ignored.
  14609.  
  14610.                                    This warning appears at level 1, except
  14611.                                    on #pragma comment( ), which causes a
  14612.                                    level 3 warning. (1, 3)
  14613.  
  14614.  C4119                             different bases 'name1' and 'name2'
  14615.                                    specified
  14616.  
  14617.                                    The _based pointers in the expression
  14618.                                    have different symbolic bases. There may
  14619.                                    be truncation or loss in the code
  14620.                                    generated. (1)
  14621.  
  14622.  C4120                             _based/unbased mismatch
  14623.  
  14624.                                    The expression contains a conversion
  14625.                                    between a _based pointer and another
  14626.                                    pointer that is unbased. Some
  14627.                                    information may have been truncated.
  14628.  
  14629.                                    This warning commonly occurs when a
  14630.                                    _based pointer is passed to a function
  14631.                                    that accepts a near or far pointer. (1)
  14632.  
  14633.  C4123                             different base expressions specified
  14634.  
  14635.                                    The expression contains a conversion
  14636.                                    between _based pointers, but the base
  14637.                                    expressions of the _based pointers are
  14638.                                    different. Some of the _based
  14639.                                    conversions may be unexpected. (1)
  14640.  
  14641.  Number                            Warning Message
  14642.  ────────────────────────────────────────────────────────────────────────────
  14643.  C4124                             _fastcall with stack checking is
  14644.                                    inefficient
  14645.  
  14646.                                    The _fastcall keyword is used for
  14647.                                    generating fast code, but stack checking
  14648.                                    causes slower code to be generated.
  14649.  
  14650.                                    Use the /Gs option or the check_stack
  14651.                                    pragma to turn off stack checking when
  14652.                                    using _fastcall.
  14653.  
  14654.                                    This warning is informational and is
  14655.                                    issued only for the first function
  14656.                                    declared under these conditions. (1)
  14657.  
  14658.  C4125                             decimal digit terminates octal escape
  14659.                                    sequence
  14660.  
  14661.                                    An octal escape sequence in a character
  14662.                                    or string constant was terminated with a
  14663.                                    decimal digit.
  14664.  
  14665.                                    The compiler evaluated the octal number
  14666.                                    without the decimal digit, and assumed
  14667.                                    the decimal digit was a character. (4)
  14668.  
  14669.                                    The following example causes this
  14670.                                    warning:
  14671.  
  14672.                                    char array1[] = "\709";
  14673.  
  14674.                                    If the digit 9 was intended as a
  14675.                                    character and was not a typing error,
  14676.                                    correct the example as follows:
  14677.  
  14678.                                    char array[] = "\0709";  /* String
  14679.                                    containing "89" */
  14680.  
  14681.  C4126                             'flag' : unknown memory model flag
  14682.  
  14683.                                    The flag used with the /A option was not
  14684.                                    recognized and was ignored. (1)
  14685.  
  14686.  C4127                             conditional expression is constant
  14687.  
  14688.                                    The controlling expression of an if
  14689.                                    statement or while loop evaluates to a
  14690.                                    constant.
  14691.  
  14692.                                    As a result, the code in the body of the
  14693.                                    if statement or while loop is either
  14694.                                    always executed or never executed.
  14695.  
  14696.                                    This warning is informational. (4)
  14697.  
  14698.  C4128                             storage-class specifier after type
  14699.  
  14700.                                    A storage-class specifier (auto, extern,
  14701.                                    register, static) appears after a type
  14702.                                    in a declaration. The compiler assumed
  14703.                                    the storage class specifier occurred
  14704.                                    before the type.
  14705.  
  14706.                                    New-style code places the storage-class
  14707.                                    specifier first. (4)
  14708.  
  14709.  Number                            Warning Message
  14710.  ────────────────────────────────────────────────────────────────────────────
  14711.  C4129                             'character' : unrecognized character
  14712.                                    escape sequence
  14713.  
  14714.                                    The character following a backslash in a
  14715.                                    character or string constant was not
  14716.                                    recognized as a valid escape sequence.
  14717.  
  14718.                                    As a result, the backslash is ignored
  14719.                                    and not printed, and the character
  14720.                                    following the backslash is printed.
  14721.  
  14722.                                    To print a single backslash (\), specify
  14723.                                    a double backslash (\\). (4)
  14724.  
  14725.  C4130                             'operator' : logical operation on
  14726.                                    address of string constant
  14727.  
  14728.                                    The operator was used with the address
  14729.                                    of a string literal. Unexpected code was
  14730.                                    generated. (4)
  14731.  
  14732.                                    For example, the following code causes
  14733.                                    this warning:
  14734.  
  14735.                                    char *pc;
  14736.                                    pc = "Hello";
  14737.                                    if (pc == "Hello") ...
  14738.  
  14739.                                    The if statement compares the value
  14740.                                    stored in the pointer  pc  to the
  14741.                                    address of the string  "Hello", which is
  14742.                                    separately allocated each time it occurs
  14743.                                    in the code. It does not compare the
  14744.                                    string pointed to by  pc  with the
  14745.                                    string  "Hello".
  14746.  
  14747.                                    To compare strings, use the strcmp
  14748.                                    function.
  14749.  
  14750.  C4131                             'function' : uses old-style declarator
  14751.  
  14752.                                    The function declaration or definition
  14753.                                    is not a prototype. (4)
  14754.  
  14755.                                    New-style function declarations are in
  14756.                                    prototype form.
  14757.  
  14758.                                    ■ Old style:
  14759.  
  14760.                                       int addrec( name, id )
  14761.                                       char *name;
  14762.                                       int id;
  14763.                                       { }
  14764.  
  14765.                                    ■ New style:
  14766.  
  14767.                                       int addrec( char *name, int id )
  14768.                                       { }
  14769.  
  14770.  Number                            Warning Message
  14771.  ────────────────────────────────────────────────────────────────────────────
  14772.  C4132                             'object' : const object should be
  14773.                                    initialized
  14774.  
  14775.                                    The value of a const object cannot be
  14776.                                    changed, so the only way to give the
  14777.                                    const object a value is to initialize it.
  14778.  
  14779.                                    It is not possible to assign a value to
  14780.                                    object. (4)
  14781.  
  14782.  C4135                             conversion between different integral
  14783.                                    types
  14784.  
  14785.                                    Information was lost between two
  14786.                                    integral types. (4)
  14787.  
  14788.                                    For example, the following code causes
  14789.                                    this warning:
  14790.  
  14791.                                    int intvar;
  14792.                                    long longvar;
  14793.                                    intvar = longvar;
  14794.  
  14795.                                    If the information is merely interpreted
  14796.                                    differently, this warning is not given,
  14797.                                    as in the following example:
  14798.  
  14799.                                    unsigned uintvar = intvar;
  14800.  
  14801.  C4136                             conversion between different floating
  14802.                                    types
  14803.  
  14804.                                    Information was lost or truncated
  14805.                                    between two floating types. (4)
  14806.  
  14807.                                    For example, the following code causes
  14808.                                    this warning:
  14809.  
  14810.                                    double doublevar;
  14811.                                    float floatvar;
  14812.                                    floatvar = doublevar;
  14813.  
  14814.                                    Note that unsuffixed floating-point
  14815.                                    constants have type double, so the
  14816.                                    following code causes this warning:
  14817.  
  14818.                                    floatvar = 1.0;
  14819.  
  14820.                                    If the floating-point constant should be
  14821.                                    treated as float type, use the  F  (or
  14822.                                    f  ) suffix on the constant to prevent
  14823.                                    the following warning:
  14824.  
  14825.                                    floatvar = 1.0F;
  14826.  
  14827.  C4137                             'function' : no return value from
  14828.                                    floating-point function
  14829.  
  14830.                                    The given function had no return
  14831.                                    statement.
  14832.  
  14833.  Number                            Warning Message
  14834.  ────────────────────────────────────────────────────────────────────────────
  14835.  C4137                             (continued)
  14836.  
  14837.                                    A long double function returns its value
  14838.                                    on the floating-point stack or the
  14839.                                    emulated stack. If the function does not
  14840.                                    return a value, a run-time
  14841.                                    floating-point stack underflow may occur.
  14842.                                    (1)
  14843.  
  14844.  C4138                             '*/' found outside of comment
  14845.  
  14846.                                    The compiler found a closing comment
  14847.                                    delimiter (*/) without a preceding
  14848.                                    opening delimiter. It assumed a space
  14849.                                    between the asterisk (*) and the forward
  14850.                                    slash ( / ). (1)
  14851.  
  14852.                                    The following example causes this
  14853.                                    warning:
  14854.  
  14855.                                    int */*Comment*/ptr;
  14856.  
  14857.                                    In this example, the compiler assumed a
  14858.                                    space before the first comment delimiter
  14859.                                    ( /* ), and issued the warning but
  14860.                                    compiled the line normally. To remove
  14861.                                    the warning, insert the assumed space.
  14862.  
  14863.                                    Usually, the cause of this warning is an
  14864.                                    attempt to nest comments.
  14865.  
  14866.                                    To comment out sections of code that may
  14867.                                    contain comments, enclose the code in an
  14868.                                    #if/#endif block and set the controlling
  14869.                                    expression to zero, as in
  14870.  
  14871.                                    #if 0
  14872.                                    int my_variable;   /* Declaration
  14873.                                    currently not needed */
  14874.                                    #endif
  14875.  
  14876.  C4139                             'hexnumber' : hex escape sequence is out
  14877.                                    of range
  14878.  
  14879.                                    A hex escape sequence appearing in a
  14880.                                    character or string constant was too
  14881.                                    large to be converted to a character.
  14882.  
  14883.                                    If in a string constant, the compiler
  14884.                                    cast the low byte of the hexadecimal
  14885.                                    number to a char. If in a char constant,
  14886.                                    the compiler made the cast and then sign
  14887.                                    extended the result. If in a char
  14888.                                    constant and compiled with the /J option,
  14889.                                    the compiler cast the value to an
  14890.                                    unsigned char. (1)
  14891.  
  14892.                                    For example, '\x1ff' is out of range for
  14893.                                    a character. Note that the following
  14894.                                    code causes this warning:
  14895.  
  14896.                                    printf("\x7Bell\n");
  14897.  
  14898.                                    The number  7Be  is a legal hex number,
  14899.                                    but is too large for a character. To
  14900.                                    correct this example, use three hex
  14901.                                    digits:
  14902.  
  14903.                                    printf("\x007Bell\n");
  14904.  
  14905.  Number                            Warning Message
  14906.  ────────────────────────────────────────────────────────────────────────────
  14907.  C4140                             'function' redefined : preceding
  14908.                                    references may be invalid
  14909.  
  14910.                                    The compiler issues this warning if a
  14911.                                    function definition changes between
  14912.                                    incremental compilations.
  14913.  
  14914.                                    References previous to the redefinition
  14915.                                    use the previous definition. Subsequent
  14916.                                    references use the new definition. (1)
  14917.  
  14918.                                    For example:
  14919.  
  14920.                                    main()
  14921.                                    {
  14922.                                      func1 ();
  14923.                                    }
  14924.                                    int func1 ()
  14925.                                    { }
  14926.  
  14927.                                    If this program is compiled with the /Gi
  14928.                                    option, and later the  func1  definition
  14929.                                    is changed to  long func1, the compiler
  14930.                                    issues this message to warn that calls
  14931.                                    to  func1  may be of the wrong type.
  14932.  
  14933.                                    Be sure that function calls reference
  14934.                                    the correct type; if not, recompile
  14935.                                    without /Gi. To avoid the problem
  14936.                                    altogether, use function prototypes.
  14937.  
  14938.  C4185                             near call to 'function' in different
  14939.                                    segment
  14940.  
  14941.                                    The given function was specified in an
  14942.                                    alloc_text pragma without being declared
  14943.                                    with _far, and then was called from the
  14944.                                    text segment.
  14945.  
  14946.                                    The compiler generated a near call.
  14947.  
  14948.                                    Although this is a warning message
  14949.                                    rather than an error message, the
  14950.                                    resulting code will not work correctly.
  14951.                                    (1)
  14952.  
  14953.  C4186                             string too long - truncated to 40
  14954.                                    characters
  14955.  
  14956.                                    The string argument for a title or
  14957.                                    subtitle pragma exceeded the maximum
  14958.                                    allowable length and was truncated. (1)
  14959.  
  14960.  C4200                             local variable 'identifier' used without
  14961.                                    having been initialized
  14962.  
  14963.                                    A reference was made to a local variable
  14964.                                    that had not been assigned a value. As a
  14965.                                    result, the value of the variable is
  14966.                                    unpredictable.
  14967.  
  14968.                                    This warning is given only when
  14969.                                    compiling with global register
  14970.                                    allocation turned on (/Oe). (1)
  14971.  
  14972.  Number                            Warning Message
  14973.  ────────────────────────────────────────────────────────────────────────────
  14974.  C4201                             local variable 'identifier' may be used
  14975.                                    without having been initialized
  14976.  
  14977.                                    A reference was made to a local variable
  14978.                                    that might not have been assigned a
  14979.                                    value. As a result, the value of the
  14980.                                    variable may be unpredictable.
  14981.  
  14982.                                    This warning is given only when
  14983.                                    compiling with the global register
  14984.                                    allocation turned on (/Oe). (3)
  14985.  
  14986.  C4202                             unreachable code
  14987.  
  14988.                                    The flow of control can never reach the
  14989.                                    indicated line.
  14990.  
  14991.                                    This warning is given only when
  14992.                                    compiling with one of the global
  14993.                                    optimizations (/Oe, /Og, or /Ol). (4)
  14994.  
  14995.  C4203                             'function' : function too large for
  14996.                                    global optimizations
  14997.  
  14998.                                    The named function was too large to fit
  14999.                                    in memory and be compiled with the
  15000.                                    selected optimization. The compiler did
  15001.                                    not perform any global optimizations
  15002.                                    (/Oe, /Og, or /Ol). Other /O
  15003.                                    optimizations, such as /Oa and /Oi, are
  15004.                                    still performed. (1)
  15005.  
  15006.                                    One of the following may remove this
  15007.                                    warning:
  15008.  
  15009.                                    ■ Recompile with fewer optimizations.
  15010.  
  15011.                                    ■ Divide the function into two or more
  15012.                                    smaller functions.
  15013.  
  15014.  C4204                             'function' : in-line assembler precludes
  15015.                                    global optimizations
  15016.  
  15017.                                    The use of in-line assembly in the named
  15018.                                    function prevented the specified global
  15019.                                    optimizations (/Oe, /Og, or /Ol) from
  15020.                                    being performed. (3)
  15021.  
  15022.  C4205                             statement has no effect
  15023.  
  15024.                                    The indicated statement will have no
  15025.                                    effect on the program execution. (4)
  15026.  
  15027.                                    Some examples of statements with no
  15028.                                    effect:
  15029.  
  15030.                                    1;
  15031.                                    a + 1;
  15032.                                    b == c;
  15033.  
  15034.  Number                            Warning Message
  15035.  ────────────────────────────────────────────────────────────────────────────
  15036.  C4206                             assignment within conditional expression
  15037.  
  15038.                                    The test value in a conditional
  15039.                                    expression was the result of an
  15040.                                    assignment.
  15041.  
  15042.                                    This warning is informational.
  15043.  
  15044.                                    An assignment has a value (the value at
  15045.                                    the left side of the assignment) that
  15046.                                    can be used legally in another
  15047.                                    expression, including a test expression.
  15048.                                    However, the intention may have been to
  15049.                                    test a relation instead of an assignment.
  15050.                                    (4)
  15051.  
  15052.                                    For example, the following line, which
  15053.                                    causes this warning, assigns  b  to  a
  15054.                                    and compares the value of  a  with 0:
  15055.  
  15056.                                    if (a = b) ...
  15057.  
  15058.                                    However, the following line tests
  15059.                                    whether  a  and  b  are equal:
  15060.  
  15061.                                    if (a == b) ...
  15062.  
  15063.  C4209                             comma operator within array index
  15064.                                    expression
  15065.  
  15066.                                    The value used as an index into an array
  15067.                                    was the last one of multiple expressions
  15068.                                    separated by the comma operator.
  15069.  
  15070.                                    An array index legally may be the value
  15071.                                    of the last expression in a series of
  15072.                                    expressions separated by the comma (,)
  15073.                                    operator. However, the intent may have
  15074.                                    been to use the expressions to specify
  15075.                                    multiple indexes into a multidimensional
  15076.                                    array. (4)
  15077.  
  15078.                                    For example, the following line, which
  15079.                                    causes this warning, is legal in C, and
  15080.                                    specifies the index  c  into array  a:
  15081.  
  15082.                                    a[b,c]
  15083.  
  15084.                                    However, the following line uses both  b
  15085.                                     and  c  as indexes into a two-
  15086.                                    dimensional array:
  15087.  
  15088.                                    a[b][c]
  15089.  
  15090.  C4300                             insufficient memory to process debugging
  15091.                                    information
  15092.  
  15093.                                    The program was compiled with the /Zi
  15094.                                    option, but not enough memory was
  15095.                                    available to create the required
  15096.                                    debugging information. (2)
  15097.  
  15098.  Number                            Warning Message
  15099.  ────────────────────────────────────────────────────────────────────────────
  15100.  C4300                             (continued)
  15101.  
  15102.                                    One of the following may be a solution:
  15103.  
  15104.                                    ■ Split the current file into two or
  15105.                                    more files and compile them separately.
  15106.  
  15107.                                    ■ Remove other programs or drivers
  15108.                                    running in the system which could be
  15109.                                    consuming significant amounts of memory.
  15110.  
  15111.  C4301                             loss of debugging information caused by
  15112.                                    optimization
  15113.  
  15114.                                    Some optimizations, such as code motion,
  15115.                                    cause references to nested variables to
  15116.                                    be moved. The information about the
  15117.                                    level at which the variables are
  15118.                                    declared may be lost. As a result, all
  15119.                                    declarations will seem to be at nesting
  15120.                                    level 1. (2)
  15121.  
  15122.  C4323                             potential divide by 0
  15123.  
  15124.                                    The second operand in a divide operation
  15125.                                    evaluated to zero at compile time,
  15126.                                    giving undefined results. (3)
  15127.  
  15128.                                    The 0 operand may have been generated by
  15129.                                    the compiler, as in the following
  15130.                                    example:
  15131.  
  15132.                                    func1() { int i,j,k; i /= j && k; }
  15133.  
  15134.  C4324                             potential mod by 0
  15135.  
  15136.                                    The second operand in a remainder
  15137.                                    operation evaluated to zero at compile
  15138.                                    time, giving undefined results. (3)
  15139.  
  15140.  C4401                             'identifier' : member is bit field
  15141.  
  15142.                                    The identifier is a bit field. A
  15143.                                    bit-field member cannot be accessed
  15144.                                    within in-line assembly code. The last
  15145.                                    packing boundary before the bit-field
  15146.                                    member was used. (1)
  15147.  
  15148.  C4402                             must use PTR operator
  15149.  
  15150.                                    A type was used on an operand without a
  15151.                                    PTR operator.
  15152.  
  15153.                                    The compiler assumed a PTR operator was
  15154.                                    used. (1)
  15155.  
  15156.  C4403                             illegal PTR operator
  15157.  
  15158.                                    A type was used on an operand with the
  15159.                                    PTR operator.
  15160.  
  15161.                                    The compiler assumed a PTR operator was
  15162.                                    not used. (1)
  15163.  
  15164.  Number                            Warning Message
  15165.  ────────────────────────────────────────────────────────────────────────────
  15166.  C4404                             period on directive ignored
  15167.  
  15168.                                    The period preceding the directive was
  15169.                                    ignored. (3)
  15170.  
  15171.  C4405                             'identifier' : identifier is reserved
  15172.                                    word
  15173.  
  15174.                                    The identifier is a reserved word. Use
  15175.                                    of it in this way may cause
  15176.                                    unpredictable results. (1)
  15177.  
  15178.  C4406                             operand on directive ignored
  15179.  
  15180.                                    The directive does not take any operands,
  15181.                                    but an operand was specified.
  15182.  
  15183.                                    The compiler ignored the operand. (1)
  15184.  
  15185.  C4407                             operand size conflict
  15186.  
  15187.                                    The size of the operands should match
  15188.                                    but did not.
  15189.  
  15190.                                    If the first operand was a register or
  15191.                                    the second operand as immediate, the
  15192.                                    size of the first operand was used.
  15193.                                    Otherwise, the size of the second
  15194.                                    operand was used. (2)
  15195.  
  15196.  C4409                             illegal instruction size
  15197.  
  15198.                                    The instruction did not have a form with
  15199.                                    the specified size. The smallest legal
  15200.                                    size was used. (1)
  15201.  
  15202.  C4410                             illegal size for operand
  15203.  
  15204.                                    One of the operands on this instruction
  15205.                                    had an incorrect size. The smallest
  15206.                                    legal size for the operand was used. (1)
  15207.  
  15208.  C4411                             'identifier' : symbol resolves to
  15209.                                    displacement register
  15210.  
  15211.                                    The identifier is a local symbol that
  15212.                                    resolves to a displacement register and
  15213.                                    therefore may be used on an operand with
  15214.                                    another symbol.
  15215.  
  15216.                                    This warning is informational. (1)
  15217.  
  15218.  C4413                             'function' : redefined, preceding
  15219.                                    references may be invalid
  15220.  
  15221.                                    The compiler issues this warning if a
  15222.                                    function definition changes between
  15223.                                    incremental compilations. (1)
  15224.  
  15225.  Number                            Warning Message
  15226.  ────────────────────────────────────────────────────────────────────────────
  15227.  C4413                             (continued)
  15228.  
  15229.                                    The following example illustrates this:
  15230.  
  15231.                                    main()
  15232.                                    {
  15233.                                    func1();
  15234.                                    }
  15235.                                    int func1()
  15236.                                    {
  15237.                                    }
  15238.  
  15239.                                    If this program is compiled with the /Gi
  15240.                                    option, then the  func1  definition is
  15241.                                    changed to  long func1, and the compiler
  15242.                                    issues this message to warn that calls
  15243.                                    to  func1  may be of the wrong type.
  15244.  
  15245.                                    Be sure that function calls reference
  15246.                                    the correct type. If not, recompile
  15247.                                    without /Gi. To avoid the problem
  15248.                                    altogether, use function prototypes.
  15249.  
  15250.  C4414                             'function' : short jump to function
  15251.                                    converted to near
  15252.  
  15253.                                    Short jumps generate a one-byte
  15254.                                    instruction. The instruction includes a
  15255.                                    short offset that represents the
  15256.                                    distance between the jump and the
  15257.                                    function definition. The compiler must
  15258.                                    generate a special record for the jump,
  15259.                                    which requires the JMP instruction to be
  15260.                                    either NEAR or FAR, but not SHORT. The
  15261.                                    compiler made the conversion. (3)
  15262.  
  15263.                                    For example, the following code causes
  15264.                                    this warning:
  15265.  
  15266.                                    main()
  15267.                                    {
  15268.                                        _asm jmp SHORT main
  15269.                                    }
  15270.  
  15271.  
  15272.  D.1.4  Compiler Limits
  15273.  
  15274.  To operate the Microsoft QuickC Compiler, you must have sufficient disk
  15275.  space available for the compiler to create temporary files used in
  15276.  processing. The space required is approximately two times the size of the
  15277.  source file.
  15278.  
  15279.  Table D.1 summarizes the limits imposed by the QuickC Compiler. If your
  15280.  program exceeds one of these limits, an error message will inform you of the
  15281.  problem.
  15282.  
  15283.  Table D.1  Limits Imposed by the QuickC Compiler
  15284.  
  15285. ╓┌──────────────┌────────────────────────┌───────────────────────────────────╖
  15286.  Program Item   Description              Limit
  15287.  ────────────────────────────────────────────────────────────────────────────
  15288.  Constants      Maximum size of a        ─
  15289.                 constant is determined
  15290.  Program Item   Description              Limit
  15291.  ────────────────────────────────────────────────────────────────────────────
  15292.                constant is determined
  15293.                 by its type; see Table
  15294.                 4.1, "Basic Data Types,"
  15295.                 in the C for Yourself
  15296.                 manual for details
  15297.  
  15298.  Identifiers    Maximum length of an     31 bytes (additional characters
  15299.                 identifier               are discarded)
  15300.  
  15301.  Declarations   Maximum level of         10 levels
  15302.                 nesting for
  15303.                 structure/union
  15304.                 definitions
  15305.  
  15306.  Preprocessor   Maximum size of a        1,024 bytes
  15307.  directives     macro definition
  15308.  
  15309.                 Maximum length of an     256 bytes
  15310.                 actual preprocessor
  15311.  Program Item   Description              Limit
  15312.  ────────────────────────────────────────────────────────────────────────────
  15313.                actual preprocessor
  15314.                 argument
  15315.  
  15316.                 Maximum number of        20 paths
  15317.                 search paths for
  15318.                 include files
  15319.  
  15320.                 Maximum number of macro  30 definitions
  15321.                 definitions in
  15322.                 /D options
  15323.  
  15324.                 Maximum number of        31 parameters
  15325.                 formal parameters to a
  15326.                 macro definition
  15327.  
  15328.                 Maximum length of an     256 bytes
  15329.                 actual preprocessor
  15330.                 argument
  15331.  
  15332.  Program Item   Description              Limit
  15333.  ────────────────────────────────────────────────────────────────────────────
  15334. 
  15335.                 Maximum level of         32 levels
  15336.                 nesting for #if, #ifdef,
  15337.                 and
  15338.                 #ifndef directives
  15339.  
  15340.                 Maximum level of         10 levels
  15341.                 nesting for include
  15342.                 files, counting the
  15343.                 open
  15344.                 source file
  15345.  
  15346.                 Maximum number of        20 paths
  15347.                 search paths for
  15348.                 include files
  15349.  
  15350.  ────────────────────────────────────────────────────────────────────────────
  15351.  
  15352.  
  15353.  
  15354.  The compiler does not set explicit limits on the length of a string or on
  15355.  the number and complexity of declarations, definitions, and statements in an
  15356.  individual function or in a program. If the compiler encounters a function
  15357.  or program that is too large or too complex to be processed, it produces an
  15358.  error message to that effect.
  15359.  
  15360.  
  15361.  D.2  Command-Line Errors
  15362.  
  15363.  Messages that indicate errors on the command line used to invoke the
  15364.  compiler have one of the following formats:
  15365.  
  15366.    command line error D2xxx: messagetext     Error
  15367.    command line warning D4xxx: messagetext      Warning
  15368.  
  15369.  The compiler issues a warning message and, if possible, continues
  15370.  processing. In some cases, command-line errors are fatal and the compiler
  15371.  terminates processing.
  15372.  
  15373.  
  15374.  D.2.1  Command-Line Error Messages
  15375.  
  15376.  When the QCL compiler encounters any of the errors listed in this section,
  15377.  it terminates, producing no object file.
  15378.  
  15379.  Number                            Command-Line Message
  15380.  ────────────────────────────────────────────────────────────────────────────
  15381.  D2000                             UNKNOWN ERROR Contact Microsoft Product
  15382.                                    Support Services
  15383.  
  15384.                                    An unexpected error occurred in the QCL
  15385.                                    driver.
  15386.  
  15387.                                    Note the circumstances of the error and
  15388.                                    notify Microsoft Corporation by
  15389.                                    following the instructions in the
  15390.                                    Microsoft Product Assistance Request
  15391.                                    form at the back of C for Yourself,
  15392.                                    included in the QuickC version 2.5
  15393.                                    package.
  15394.  
  15395.  D2002                             conflict in memory-model specification
  15396.  
  15397.                                    More than one memory-model specification
  15398.                                    was encountered.
  15399.  
  15400.                                    The following is an example of a command
  15401.                                    line that causes this error:
  15402.  
  15403.                                    qcl /AS /AM program.c
  15404.  
  15405.                                    If the CL environment variable is
  15406.                                    currently set for a memory-model option,
  15407.                                    and the CL command is given with another
  15408.                                    memory-model option, this error will
  15409.                                    occur.
  15410.  
  15411.  Number                            Command-Line Message
  15412.  ────────────────────────────────────────────────────────────────────────────
  15413.  D2003                             missing source file name
  15414.  
  15415.                                    The QCL command line contains options
  15416.                                    but no source-file name.
  15417.  
  15418.                                    Note that the QCL command by itself,
  15419.                                    with no options or source-file
  15420.                                    specification, will print a brief
  15421.                                    message about the command-line syntax.
  15422.  
  15423.  D2008                             limit of 'option' exceeded at 'string'
  15424.  
  15425.                                    The limit of the /D, /I, or /U option
  15426.                                    was exceeded.
  15427.  
  15428.                                    Reduce the number of identifiers you
  15429.                                    define or undefine, or the number of
  15430.                                    directories to search for include files,
  15431.                                    to less than 30 each.
  15432.  
  15433.  D2011                             only one floating-point option allowed
  15434.  
  15435.                                    Both of the floating-point options, /FPi
  15436.                                    and /FPi87, were specified.
  15437.  
  15438.                                    Specify only one of the floating-point
  15439.                                    options.
  15440.  
  15441.  D2012                             too many linker flags on command line
  15442.  
  15443.                                    More than 128 options were passed to the
  15444.                                    linker.
  15445.  
  15446.  D2013                             incomplete model specification
  15447.  
  15448.                                    A customized memory model was
  15449.                                    incompletely specified with the /Astring
  15450.                                    option.
  15451.  
  15452.                                    Two types of options begin with /A:
  15453.  
  15454.                                    ■ The /Astring customized memory-model
  15455.                                    option requires three letters in the
  15456.                                    string. The letters specify the
  15457.                                    code-pointer size, data-pointer size,
  15458.                                    and data-segment setup attributes of the
  15459.                                    memory model.
  15460.  
  15461.                                    ■ The /Ax option for specifying a
  15462.                                    standard memory model requires one
  15463.                                    uppercase letter. If the letter is
  15464.                                    lowercase, the option is interpreted as
  15465.                                    an incomplete specification of a
  15466.                                    customized memory model. For example:
  15467.  
  15468.                                    qcl /As
  15469.  
  15470.                                    A single lowercase letter can be used
  15471.                                    only if it is a segment setup option,
  15472.                                    and is used in combination with a
  15473.                                    standard memory model.
  15474.  
  15475.  D2016                             'option1' and 'option2' are incompatible
  15476.  
  15477.                                    Two incompatible command-line options
  15478.                                    were specified.
  15479.  
  15480.  Number                            Command-Line Message
  15481.  ────────────────────────────────────────────────────────────────────────────
  15482.  D2018                             cannot open linker response file
  15483.  
  15484.                                    The compiler cannot open a response file
  15485.                                    to specify the object-file names for the
  15486.                                    linker.
  15487.  
  15488.                                    Set the TMP environment variable to a
  15489.                                    valid drive and directory, where the
  15490.                                    compiler can create a temporary response
  15491.                                    file for the linker.
  15492.  
  15493.  D2019                             cannot overwrite the source/object file,
  15494.                                    'filename'
  15495.  
  15496.                                    The input-file name was specified as an
  15497.                                    output-file name. The compiler will not
  15498.                                    allow the source or object file to be
  15499.                                    overwritten by one of the compiler
  15500.                                    output files.
  15501.  
  15502.  D2020                             'option' option requires extended
  15503.                                    keywords to be enabled (/Ze)
  15504.  
  15505.                                    Either the /Gr or /Gc option was
  15506.                                    specified on the command line in
  15507.                                    combination with the /Za option, which
  15508.                                    disables extended keywords.
  15509.  
  15510.                                    The /Gr option requires the extended
  15511.                                    keyword _fastcall to be enabled, and the
  15512.                                    /Gc option requires the extended
  15513.                                    keywords _pascal and _fortran. Extended
  15514.                                    keywords are enabled by default, or if
  15515.                                    the /Ze option is specified.
  15516.  
  15517.  D2021                             invalid numerical argument 'number'
  15518.  
  15519.                                    A number greater than 65,534 was
  15520.                                    specified as a numerical argument.
  15521.  
  15522.  D2022                             cannot open help file, QCL.MSG
  15523.  
  15524.                                    The /HELP option was given, but the file
  15525.                                    containing the command-line options was
  15526.                                    not in the current directory or in any
  15527.                                    of the directories specified by the PATH
  15528.                                    environment variable.
  15529.  
  15530.  D2027                             could not execute 'component'
  15531.  
  15532.                                    The QCL driver was unable to execute one
  15533.                                    of the compiler components or the linker,
  15534.                                    possibly for one of the following
  15535.                                    reasons:
  15536.  
  15537.                                    ■ There is not enough memory to load the
  15538.                                    component.
  15539.  
  15540.                                    ■ The given component is for the wrong
  15541.                                    operating system.
  15542.  
  15543.                                    ■ The given component is corrupted.
  15544.  
  15545.  D2031                             too many flags/files on command line
  15546.  
  15547.                                    There are more than 128 arguments
  15548.                                    combined from the command line and the
  15549.                                    CL environment variable.
  15550.  
  15551.                                    Reduce the number of arguments. You can
  15552.                                    do this by compiling fewer files at one
  15553.                                    time.
  15554.  
  15555.  
  15556.  D.2.2  Command-Line Warning Messages
  15557.  
  15558.  The messages listed in this section indicate potential problems, but the
  15559.  errors do not hinder compilation and linking.
  15560.  
  15561.  Number                             Command-Line Warning Message
  15562.  ────────────────────────────────────────────────────────────────────────────
  15563.  D4000                             UNKNOWN WARNING Contact Microsoft
  15564.                                    Product Support Services
  15565.  
  15566.                                    An unexpected warning occurred in the
  15567.                                    QCL driver.
  15568.  
  15569.                                    Note the circumstances of the error and
  15570.                                    notify Microsoft Corporation by
  15571.                                    following the instructions in the
  15572.                                    Microsoft Product Assistance Request
  15573.                                    form at the back of C for Yourself,
  15574.                                    included in the QuickC version 2.5
  15575.                                    package.
  15576.  
  15577.  D4002                             ignoring unknown flag 'option'
  15578.  
  15579.                                    The command-line option specified by
  15580.                                    option is not recognized by the QCL
  15581.                                    driver.
  15582.  
  15583.  D4003                             different processors selected for code
  15584.                                    generation
  15585.  
  15586.                                    More than one /Gn option was specified
  15587.                                    with conflicting specifications. The
  15588.                                    last processor selector on the command
  15589.                                    line is used.
  15590.  
  15591.                                    For example, the following command line
  15592.                                    can cause this error:
  15593.  
  15594.                                    qcl /G2 /G0 program.c
  15595.  
  15596.                                    In this example, the /G0 processor
  15597.                                    selector is used.
  15598.  
  15599.  D4005                             could not locate 'component'; Please
  15600.                                    enter new file name (full path) or
  15601.                                    CTRL+C to quit:
  15602.  
  15603.                                    The QCL driver was unable to find the
  15604.                                    program specified by component in the
  15605.                                    search path.
  15606.  
  15607.  D4007                             /C ignored (must also specify /P or /E
  15608.                                    or /EP)
  15609.  
  15610.                                    The /C option must be used in
  15611.                                    conjunction with one of the preprocessor
  15612.                                    output flags (/P, /E, or /EP).
  15613.  
  15614.                                    Note that the /C option is different
  15615.                                    from the /c option. Arguments to the QCL
  15616.                                    driver are case sensitive.
  15617.  
  15618.  Number                             Command-Line Warning Message
  15619.  ────────────────────────────────────────────────────────────────────────────
  15620.  D4009                             threshold only for far/huge data,
  15621.                                    ignored
  15622.  
  15623.                                    The /Gt option cannot be used in memory
  15624.                                    models that have near data pointers. It
  15625.                                    can be used only in compact, large, and
  15626.                                    huge models, or a customized memory
  15627.                                    model that uses far data pointers.
  15628.  
  15629.  D4014                             invalid value 'number1' for 'option';
  15630.                                    default 'number2' is used
  15631.  
  15632.                                    An invalid value was given for an option
  15633.                                    that only accepts certain specific
  15634.                                    values. The value actually used by the
  15635.                                    compiler is number2.
  15636.  
  15637.                                    The following example can cause this
  15638.                                    warning:
  15639.  
  15640.                                    qcl /Zp3 program.c
  15641.  
  15642.                                    In this example, 3 is an invalid value.
  15643.                                    In the /Zpn option, the value n of may
  15644.                                    be 1, 2, or 4 only.
  15645.  
  15646.  D4020                             unsupported switch 'option'
  15647.  
  15648.                                    The given option is not supported by QCL.
  15649.  
  15650.  
  15651.  D.3  Run-Time Errors
  15652.  
  15653.  Run-time error messages fall into four categories:
  15654.  
  15655.  
  15656.    1.  Floating-point exceptions generated by the 8087/287 hardware or the
  15657.        emulator.
  15658.  
  15659.    2.  Error messages generated by the run-time library to notify you of
  15660.        serious errors.
  15661.  
  15662.    3.  Error messages generated by program calls to error-handling routines
  15663.        in the C run-time library─the abort, assert, and perror routines.
  15664.        These routines print an error message to standard error output
  15665.        whenever the program calls the given routine.
  15666.  
  15667.    4.  Error messages generated by calls to math routines in the C run-time
  15668.        library. On error, the math routines return an error value, and some
  15669.        print a message to the standard error output. See the online help or
  15670.        the Microsoft C Run-Time Library Reference (sold separately) for
  15671.        descriptions of the math routines and corresponding error messages.
  15672.  
  15673.  
  15674.  
  15675.  D.3.1  Math Error Messages
  15676.  
  15677.  The error messages below correspond to floating-point exceptions generated
  15678.  by the 8087/287/387 hardware. Refer to the Intel documentation for your
  15679.  processor for a detailed discussion of hardware exceptions. These errors may
  15680.  also be detected by the floating-point emulator or alternate math library.
  15681.  
  15682.  Using C's default 8087/287 control-word settings, the following exceptions
  15683.  are masked and do not occur:
  15684.  
  15685.  Exception                         Default Masked Action
  15686.  ────────────────────────────────────────────────────────────────────────────
  15687.  Denormal                          Exception masked
  15688.  
  15689.  Underflow                         Result goes to 0.0
  15690.  
  15691.  Inexact                           Exception masked
  15692.  
  15693.  The following errors do not occur with code generated by the Microsoft
  15694.  QuickC Compiler or provided in the standard C library:
  15695.  
  15696.    Square root
  15697.    Stack underflow
  15698.    Unemulated
  15699.  
  15700.  A floating-point error message takes the following general form:
  15701.  
  15702.    run-time error M61nn: MATH
  15703.    - floating-point error: messagetext
  15704.  
  15705.  The floating-point exceptions are listed and described below.
  15706.  
  15707.  Number                            Math Error Message
  15708.  ────────────────────────────────────────────────────────────────────────────
  15709.  M6101                             invalid
  15710.  
  15711.                                    An invalid operation occurred. This
  15712.                                    error usually occurs when operating on a
  15713.                                    NAN (not a number) or infinity.
  15714.  
  15715.                                    This error terminates the program with
  15716.                                    exit code 129.
  15717.  
  15718.  Number                            Math Error Message
  15719.  ────────────────────────────────────────────────────────────────────────────
  15720.  M6102                             denormal
  15721.  
  15722.                                    A very small floating-point number was
  15723.                                    generated which may no longer be valid
  15724.                                    due to loss of significance. Denormals
  15725.                                    are normally masked, causing them to be
  15726.                                    trapped and operated upon.
  15727.  
  15728.                                    This error terminates the program with
  15729.                                    exit code 130.
  15730.  
  15731.  M6103                             divide by 0
  15732.  
  15733.                                    An attempt was made to divide by zero in
  15734.                                    a floating-point operation.
  15735.  
  15736.                                    This error terminates the program with
  15737.                                    exit code 131.
  15738.  
  15739.  M6104                             overflow
  15740.  
  15741.                                    An overflow occurred in a floating-point
  15742.                                    operation.
  15743.  
  15744.                                    This error terminates the program with
  15745.                                    exit code 132.
  15746.  
  15747.  M6105                             underflow
  15748.  
  15749.                                    An underflow occurred in a
  15750.                                    floating-point operation. An underflow
  15751.                                    is normally masked, with the
  15752.                                    underflowing value replaced by 0.0.
  15753.  
  15754.                                    This error terminates the program with
  15755.                                    exit code 133.
  15756.  
  15757.  M6106                             inexact
  15758.  
  15759.                                    Loss of precision occurred in a
  15760.                                    floating-point operation. This exception
  15761.                                    is normally masked because almost any
  15762.                                    floating-point operation can cause loss
  15763.                                    of precision.
  15764.  
  15765.                                    This error terminates the program with
  15766.                                    exit code 134.
  15767.  
  15768.  M6107                             unemulated
  15769.  
  15770.                                    An attempt was made to execute an
  15771.                                    8087/287/387 instruction that is invalid
  15772.                                    or is not supported by the emulator.
  15773.  
  15774.                                    This error terminates the program with
  15775.                                    exit code 135.
  15776.  
  15777.  M6108                             square root
  15778.  
  15779.                                    The operand in a square-root operation
  15780.                                    was negative.
  15781.  
  15782.                                    This error terminates the program with
  15783.                                    exit code 136.
  15784.  
  15785.                                    Note that the sqrt function in the C
  15786.                                    run-time library checks the argument
  15787.                                    before performing the operation and
  15788.                                    returns an error value if the operand is
  15789.                                    negative.
  15790.  
  15791.  Number                            Math Error Message
  15792.  ────────────────────────────────────────────────────────────────────────────
  15793.  M6110                             stack overflow
  15794.  
  15795.                                    A floating-point expression caused a
  15796.                                    stack overflow on the 8087/287/387
  15797.                                    coprocessor or the emulator.
  15798.                                    Stack-overflow exceptions are trapped up
  15799.                                    to a limit of seven levels in addition
  15800.                                    to the eight levels normally supported
  15801.                                    by the 8087/287/387 coprocessor.
  15802.  
  15803.                                    This error terminates the program with
  15804.                                    exit code 138.
  15805.  
  15806.  M6111                             stack underflow
  15807.  
  15808.                                    A floating-point operation resulted in a
  15809.                                    stack underflow on the 8087/287/387
  15810.                                    coprocessor or the emulator.
  15811.  
  15812.                                    This error is often caused by a call to
  15813.                                    a long double function that does not
  15814.                                    return a value. For example, the
  15815.                                    following gives this error when compiled
  15816.                                    and run:
  15817.  
  15818.                                    long double ld() {};
  15819.                                    main ()
  15820.                                    {
  15821.                                      ld();
  15822.                                    }
  15823.  
  15824.                                    This error terminates the program with
  15825.                                    exit code 139.
  15826.  
  15827.  
  15828.  D.3.2  Run-Time Error Messages
  15829.  
  15830.  The following messages may be generated at run time when your program has
  15831.  serious errors.
  15832.  
  15833.  A run-time error message takes the following general form:
  15834.  
  15835.    run-time error R6nnn- messagetext
  15836.  
  15837.  Number                            Run-Time Error Message
  15838.  ────────────────────────────────────────────────────────────────────────────
  15839.  R6000                             stack overflow
  15840.  
  15841.                                    The program has run out of stack space.
  15842.                                    This can occur when a program uses a
  15843.                                    large amount of local data or is heavily
  15844.                                    recursive.
  15845.  
  15846.                                    Recompile using the /F compiler option,
  15847.                                    or relink using the linker /STACK option
  15848.                                    to allocate a larger stack.
  15849.  
  15850.  Number                            Run-Time Error Message
  15851.  ────────────────────────────────────────────────────────────────────────────
  15852.  R6001                             null pointer assignment
  15853.  
  15854.                                    The contents of the NULL segment have
  15855.                                    changed in the course of program
  15856.                                    execution. The program has written to
  15857.                                    this area, usually by an inadvertent
  15858.                                    assignment through a null pointer.
  15859.  
  15860.                                    The NULL segment is a location in low
  15861.                                    memory that is not normally used. The
  15862.                                    contents of the NULL segment are checked
  15863.                                    upon program termination. If a change is
  15864.                                    detected, the error message is printed
  15865.                                    and the exit code is 255.
  15866.  
  15867.                                    Note that the program can contain null
  15868.                                    pointers without causing this error. The
  15869.                                    error appears only when the program
  15870.                                    writes to memory through a null pointer.
  15871.                                    It reflects a potentially serious error
  15872.                                    in the program. Although a program that
  15873.                                    produces this error may appear to
  15874.                                    operate correctly, it may cause problems
  15875.                                    in the future and may fail to run in a
  15876.                                    different operating environment.
  15877.  
  15878.  R6002                             floating-point support not loaded
  15879.  
  15880.                                    The program needs the floating-point
  15881.                                    library, but the library was not loaded.
  15882.  
  15883.                                    This occurs in two situations:
  15884.  
  15885.  
  15886.    1.  The program was compiled or linked with an option (such as /FPi87)
  15887.        that required an 8087/287/387 coprocessor, but the program was run on
  15888.        a machine that did not have a coprocessor installed.
  15889.  
  15890.            Either recompile the program with the /FPi option or install a
  15891.        coprocessor.
  15892.  
  15893.    2.  A format string for one of the routines in the printf or scanf
  15894.        families contains a floating-point format specification, and there are
  15895.        no floating-point values or variables in the program. The compiler
  15896.        attempts to minimize the size of a program by loading floating-point
  15897.        support only when necessary. Floating-point format specifications
  15898.        within format strings are not detected, so the necessary
  15899.        floating-point routines are not loaded.
  15900.  
  15901.        Use a floating-point argument to correspond to the floating-point
  15902.        format specification, or perform a floating-point assignment elsewhere
  15903.        in the program. This causes floating-point support to be loaded.
  15904.  
  15905.  R6003                             integer divide by 0
  15906.  
  15907.                                    An attempt was made to divide an integer
  15908.                                    by 0, giving an undefined result.
  15909.  
  15910.  
  15911.  Number                            Run-Time Error Message
  15912.  ────────────────────────────────────────────────────────────────────────────
  15913.  
  15914.  R6005                             not enough memory on exec
  15915.  
  15916.                                    Not enough memory remained to load the
  15917.                                    program being spawned.
  15918.  
  15919.                                    This error occurs when a child process
  15920.                                    spawned by one of the exec library
  15921.                                    routines fails and the operating system
  15922.                                    could not return control to the parent
  15923.                                    process.
  15924.  
  15925.  R6006                             invalid format on exec
  15926.  
  15927.                                    The file to be executed by one of the
  15928.                                    exec functions was not in the correct
  15929.                                    format for an executable file.
  15930.  
  15931.                                    This error occurs when a child process
  15932.                                    spawned by one of the exec library
  15933.                                    routines fails and the operating system
  15934.                                    could not return control to the parent
  15935.                                    process.
  15936.  
  15937.  R6007                             invalid environment on exec
  15938.  
  15939.                                    During a call to one of the exec
  15940.                                    functions, the operating system found
  15941.                                    that the child process was given an
  15942.                                    invalid environment block.
  15943.  
  15944.                                    This error occurs when a child process
  15945.                                    spawned by one of the exec library
  15946.                                    routines fails and the operating system
  15947.                                    could not return control to the parent
  15948.                                    process.
  15949.  
  15950.  R6008                             not enough space for arguments
  15951.  
  15952.                                    There was enough memory to load the
  15953.                                    program but not enough room for the argv
  15954.                                    vector.
  15955.  
  15956.                                    There are several ways to correct this
  15957.                                    problem:
  15958.  
  15959.                                    ■ Increase the amount of memory
  15960.                                    available to the program.
  15961.  
  15962.                                    ■ Reduce the number and size of
  15963.                                    command-line arguments.
  15964.  
  15965.                                    ■ Reduce the environment size, removing
  15966.                                    unnecessary variables.
  15967.  
  15968.                                    ■ Rewrite either the _setargv or the
  15969.                                    _setenvp routine.
  15970.  
  15971.  R6009                             not enough space for environment
  15972.  
  15973.                                    There was enough memory to load the
  15974.                                    program but not enough room for the envp
  15975.                                    vector.
  15976.  
  15977.  
  15978.  Number                            Run-Time Error Message
  15979.  ────────────────────────────────────────────────────────────────────────────
  15980.  
  15981.  R6009                             (continued)
  15982.  
  15983.                                    There are several ways to correct this
  15984.                                    problem:
  15985.  
  15986.                                    ■ Increase the amount of memory
  15987.                                    available to the program.
  15988.  
  15989.                                    ■ Reduce the number and size of
  15990.                                    command-line arguments.
  15991.  
  15992.                                    ■ Reduce the environment size, removing
  15993.                                    unnecessary variables.
  15994.  
  15995.                                    ■ Rewrite either the _setargv or the
  15996.                                    _setenvp routine.
  15997.  
  15998.  R6010                             abnormal program termination
  15999.  
  16000.                                    This error is displayed by the abort( )
  16001.                                    routine. The program terminates with
  16002.                                    exit code 3, unless an abort( ) signal
  16003.                                    handler has been defined by using the
  16004.                                    signal( ) function.
  16005.  
  16006.  R6012                             illegal near-pointer use
  16007.  
  16008.                                    A null near pointer was used in the
  16009.                                    program.
  16010.  
  16011.                                    This error occurs only if pointer
  16012.                                    checking is in effect. Pointer checking
  16013.                                    is set with the /Zr option or the
  16014.                                    check_pointer pragma.
  16015.  
  16016.  R6013                             illegal far-pointer use
  16017.  
  16018.                                    An out-of-range far pointer was used in
  16019.                                    the program.
  16020.  
  16021.                                    This error occurs only if pointer
  16022.                                    checking is in effect. Pointer checking
  16023.                                    is set with the /Zr option or the
  16024.                                    check_pointer pragma.
  16025.  
  16026.  
  16027.  
  16028.  
  16029.  D.4  QLINK Error Messages
  16030.  
  16031.  This section lists and describes error messages generated by the QuickC
  16032.  linker (QLINK), and the special incremental linker (ILINK) that is invoked
  16033.  when you compile QuickC programs with the /Gi or /Li option. Note that in
  16034.  most cases, QuickC invokes QLINK if ILINK fails.
  16035.  
  16036.  Fatal errors cause the linker to stop execution. Fatal error messages have
  16037.  the following format:
  16038.  
  16039.    location  : error L1 xxx : messagetext
  16040.  
  16041.  For QLINK, fatal error numbers range from L1000 to L1199. For ILINK, the
  16042.  incremental linker, fatal error numbers range from L1200 to L1249.
  16043.  
  16044.  Nonfatal errors indicate problems in the executable file. QLINK produces the
  16045.  executable file. Nonfatal error messages have the following format:
  16046.  
  16047.    location  : error L2xxx : messagetext
  16048.  
  16049.  Nonfatal errors generated by ILINK are numbered from L1250 to L1299.
  16050.  
  16051.  Warnings indicate possible problems in the executable file. QLINK produces
  16052.  the executable file. Warnings have the following format:
  16053.  
  16054.    location  : warning L4xxx : messagetext
  16055.  
  16056.  Warning numbers less than L4200 apply to QLINK. Those numbers greater than
  16057.  L4200 apply to ILINK.
  16058.  
  16059.  In all three kinds of messages, location is the input file associated with
  16060.  the error, or  QLINK  if there is no input file. If the input file is an
  16061.  .OBJ or .LIB file, and a module name is associated with the error, the
  16062.  module name is enclosed in parentheses, as shown in the following examples:
  16063.  
  16064.  
  16065.    SLIBC.LIB(_file)
  16066.    MAIN.OBJ(main.c)
  16067.    TEXT.OBJ
  16068.  
  16069.  The following error messages may appear when you link object files.
  16070.  
  16071.  
  16072.  D.4.1  Fatal Error Messages
  16073.  
  16074.  Number                            Fatal Error Message
  16075.  ────────────────────────────────────────────────────────────────────────────
  16076.  L1001                             'option' : option name ambiguous
  16077.  
  16078.                                    A unique option name did not appear
  16079.                                    after the option indicator.
  16080.  
  16081.                                    An option is specified by a
  16082.                                    forward-slash indicator ( / ) and a name.
  16083.                                    The name can be specified by an
  16084.                                    abbreviation of the full name, but the
  16085.                                    abbreviation must be unambiguous.
  16086.  
  16087.                                    For example, many options begin with the
  16088.                                    letter N, so the following command
  16089.                                    causes this error:
  16090.  
  16091.                                    QLINK /N main;
  16092.  
  16093.  L1002                             'option' : unrecognized option name
  16094.  
  16095.                                    An unrecognized name followed the option
  16096.                                    indicator.
  16097.  
  16098.                                    An option is specified by a
  16099.                                    forward-slash indicator ( / ) and a name.
  16100.                                    The name can be specified by a legal
  16101.                                    abbreviation of the full name.
  16102.  
  16103.                                    For example, the following command
  16104.                                    causes this error:
  16105.  
  16106.                                    QLINK /NODEFAULTLIBSEARCH main
  16107.  
  16108.  L1003                             /QUICKLIB, /EXEPACK incompatible
  16109.  
  16110.                                    The linker cannot be given both the /Q
  16111.                                    option and the /E option.
  16112.  
  16113.  L1004                             'value' : invalid numeric value
  16114.  
  16115.                                    An incorrect value appeared for one of
  16116.                                    the linker options. For example, a
  16117.                                    character string was given for an option
  16118.                                    that requires a numeric value.
  16119.  
  16120.  L1005                             'option' : packing limit exceeds 65536
  16121.                                    bytes
  16122.  
  16123.                                    The value supplied with the /PACKCODE or
  16124.                                    /PACKDATA option exceeds the limit of
  16125.                                    65,536 bytes.
  16126.  
  16127.  L1006                             /STACKSIZE : stack size exceeds 65535
  16128.                                    bytes
  16129.  
  16130.                                    The value given as a parameter to the
  16131.                                    /STACK option exceeds the maximum
  16132.                                    allowed.
  16133.  
  16134.  Number                            Fatal Error Message
  16135.  ────────────────────────────────────────────────────────────────────────────
  16136.  L1007                             /OVERLAYINTERRUPT : interrupt number
  16137.                                    exceeds 255
  16138.  
  16139.                                    A number greater than 255 was given as
  16140.                                    the /OVERLAYINTERRUPT option value.
  16141.  
  16142.                                    Check The MS-DOS Encyclopedia or other
  16143.                                    DOS technical manual for information
  16144.                                    about interrupts.
  16145.  
  16146.  L1008                             /SEGMENTS : segment limit set too high
  16147.  
  16148.                                    The /SEGMENTS option specified a limit
  16149.                                    on the number of definitions of logical
  16150.                                    segments that was impossible to satisfy.
  16151.  
  16152.  L1009                             'value' : CPARMAXALLOC : illegal value
  16153.  
  16154.                                    The value specified in the /CPARMAXALLOC
  16155.                                    option was not in the range  1-65,535.
  16156.  
  16157.  L1020                             no object modules specified
  16158.  
  16159.                                    No object-file names were specified to
  16160.                                    the linker.
  16161.  
  16162.  L1021                             cannot nest response files
  16163.  
  16164.                                    A response file occurred within a
  16165.                                    response file.
  16166.  
  16167.  L1022                             response line too long
  16168.  
  16169.                                    A line in a response file was longer
  16170.                                    than 255 characters.
  16171.  
  16172.  L1023                             terminated by user
  16173.  
  16174.                                    CTRL+C was entered.
  16175.  
  16176.  L1024                             nested right parentheses
  16177.  
  16178.                                    The contents of an overlay were typed
  16179.                                    incorrectly on the command line.
  16180.  
  16181.  L1025                             nested left parentheses
  16182.  
  16183.                                    The contents of an overlay were typed
  16184.                                    incorrectly on the command line.
  16185.  
  16186.  L1026                             unmatched right parenthesis
  16187.  
  16188.                                    A right parenthesis was missing from the
  16189.                                    contents specification of an overlay on
  16190.                                    the command line.
  16191.  
  16192.  Number                            Fatal Error Message
  16193.  ────────────────────────────────────────────────────────────────────────────
  16194.  L1027                             unmatched left parenthesis
  16195.  
  16196.                                    A left parenthesis was missing from the
  16197.                                    contents specification of an overlay on
  16198.                                    the command line.
  16199.  
  16200.  L1030                             missing internal name
  16201.  
  16202.                                    An IMPORTS statement specified an
  16203.                                    ordinal in the module-definition file
  16204.                                    without including the internal name of
  16205.                                    the routine.
  16206.  
  16207.                                    The name must be given if an ordinal is
  16208.                                    specified.
  16209.  
  16210.  L1031                             module description redefined
  16211.  
  16212.                                    A DESCRIPTION statement in the
  16213.                                    module-definition file was specified
  16214.                                    more than once.
  16215.  
  16216.  L1032                             module name redefined
  16217.  
  16218.                                    The module name was specified more than
  16219.                                    once (in a NAME or LIBRARY statement).
  16220.  
  16221.  L1040                             too many exported entries
  16222.  
  16223.                                    The program exceeded the limit of 65,535
  16224.                                    exported names.
  16225.  
  16226.  L1041                             resident-name table overflow
  16227.  
  16228.                                    The size of the resident-name table
  16229.                                    exceeds 65,535 bytes.
  16230.  
  16231.                                    An entry in the resident-name table is
  16232.                                    made for each exported routine
  16233.                                    designated RESIDENTNAME, and consists of
  16234.                                    the name plus three bytes of information.
  16235.                                    The first entry is the module name.
  16236.  
  16237.                                    Reduce the number of exported routines
  16238.                                    or change some to nonresident status.
  16239.  
  16240.  L1042                             nonresident-name table overflow
  16241.  
  16242.                                    The size of the nonresident-name table
  16243.                                    exceeds 65,535 bytes.
  16244.  
  16245.                                    An entry in the nonresident-name table
  16246.                                    is made for each exported routine not
  16247.                                    designated RESIDENTNAME, and consists of
  16248.                                    the name plus three bytes of information.
  16249.                                    The first entry is the DESCRIPTION
  16250.                                    statement.
  16251.  
  16252.                                    Reduce the number of exported routines
  16253.                                    or change some to resident status.
  16254.  
  16255.  Number                            Fatal Error Message
  16256.  ────────────────────────────────────────────────────────────────────────────
  16257.  L1043                             relocation table overflow
  16258.  
  16259.                                    More than 32,768 long calls, long jumps,
  16260.                                    or other long pointers appeared in the
  16261.                                    program.
  16262.  
  16263.                                    Try replacing long references with short
  16264.                                    references where possible, and recreate
  16265.                                    the object module.
  16266.  
  16267.  L1044                             imported-name table overflow
  16268.  
  16269.                                    The size of the imported-names table
  16270.                                    exceeds 65,535 bytes.
  16271.  
  16272.                                    An entry in the imported-names table is
  16273.                                    made for each new name given in the
  16274.                                    IMPORTS section, including the module
  16275.                                    names, and consists of the name plus one
  16276.                                    byte.
  16277.  
  16278.                                    Reduce the number of imports.
  16279.  
  16280.  L1045                             too many TYPDEF records
  16281.  
  16282.                                    An object module contained more than 255
  16283.                                    TYPDEF records. These records describe
  16284.                                    communal variables.
  16285.  
  16286.                                    This error can appear only with programs
  16287.                                    produced by the Microsoft FORTRAN
  16288.                                    Compiler or other compilers that support
  16289.                                    communal variables. (TYPDEF is a DOS
  16290.                                    term. It is explained in the Microsoft
  16291.                                    MS-DOS Programmer's Reference and in
  16292.                                    other reference books on DOS.)
  16293.  
  16294.  L1046                             too many external symbols in one module
  16295.  
  16296.                                    An object module specified more than the
  16297.                                    limit of 1,023 external symbols.
  16298.  
  16299.                                    Break the module into smaller parts.
  16300.  
  16301.  L1047                             too many group, segment, and class names
  16302.                                    in one module
  16303.  
  16304.                                    The program contained too many group,
  16305.                                    segment, and class names.
  16306.  
  16307.                                    Reduce the number of groups, segments,
  16308.                                    or classes. Recreate the object file.
  16309.  
  16310.  L1048                             too many segments in one module
  16311.  
  16312.                                    An object module had more than 255
  16313.                                    segments.
  16314.  
  16315.                                    Split the module or combine segments.
  16316.  
  16317.  L1049                             too many segments
  16318.  
  16319.                                    The program had more than the maximum
  16320.                                    number of segments.
  16321.  
  16322.                                    Use the /SEGMENTS option when linking to
  16323.                                    specify the maximum legal number of
  16324.                                    segments. The range of possible settings
  16325.                                    is 0-3,072. The default is 128.
  16326.  
  16327.  Number                            Fatal Error Message
  16328.  ────────────────────────────────────────────────────────────────────────────
  16329.  L1050                             too many groups in one module
  16330.  
  16331.                                    QLINK encountered more than 21 group
  16332.                                    definitions (GRPDEF) in a single  module.
  16333.  
  16334.                                    Reduce the number of group definitions
  16335.                                    or split the module. (Group definitions
  16336.                                    are explained in the Microsoft MS-DOS
  16337.                                    Programmer's Reference and in other
  16338.                                    reference books on DOS.)
  16339.  
  16340.  L1051                             too many groups
  16341.  
  16342.                                    The program defined more than 20 groups,
  16343.                                    not counting DGROUP.
  16344.  
  16345.                                    Reduce the number of groups.
  16346.  
  16347.  L1052                             too many libraries
  16348.  
  16349.                                    An attempt was made to link with more
  16350.                                    than 32 libraries.
  16351.  
  16352.                                    Combine libraries, or use modules that
  16353.                                    require fewer libraries.
  16354.  
  16355.  L1053                             out of memory for symbol table
  16356.  
  16357.                                    The program had more symbolic
  16358.                                    information (such as public, external,
  16359.                                    segment, group, class, and file names)
  16360.                                    than could fit in available memory.
  16361.  
  16362.                                    Try freeing memory by linking from the
  16363.                                    DOS command level instead of from a
  16364.                                    makefile or the QuickC environment.
  16365.                                    Otherwise, combine modules or segments
  16366.                                    and try to eliminate as many public
  16367.                                    symbols as possible.
  16368.  
  16369.  L1054                             requested segment limit too high
  16370.  
  16371.                                    QLINK did not have enough memory to
  16372.                                    allocate tables describing the number of
  16373.                                    segments requested. The number of
  16374.                                    segments is the default of 128 or the
  16375.                                    value specified with the /SEGMENTS
  16376.                                    option.
  16377.  
  16378.                                    Try linking again by using the /SEGMENTS
  16379.                                    option to select a smaller number of
  16380.                                    segments (for example, use 64 if the
  16381.                                    default was used previously), or free
  16382.                                    some memory by eliminating resident
  16383.                                    programs or shells.
  16384.  
  16385.  L1056                             too many overlays
  16386.  
  16387.                                    The program defined more than 63
  16388.                                    overlays.
  16389.  
  16390.  L1057                             data record too large
  16391.  
  16392.                                    An LEDATA record (in an object module)
  16393.                                    contained more than 1,024 bytes of data.
  16394.                                    This is a translator error. (LEDATA is a
  16395.                                    DOS term explained in the Microsoft
  16396.                                    MS-DOS Programmer's Reference and in
  16397.                                    other DOS reference books.)
  16398.  
  16399.  Number                            Fatal Error Message
  16400.  ────────────────────────────────────────────────────────────────────────────
  16401.  L1057                             (continued)
  16402.  
  16403.                                    Note which translator (compiler or
  16404.                                    assembler) produced the incorrect object
  16405.                                    module. Please report the circumstances
  16406.                                    of the error to Microsoft Corporation by
  16407.                                    following the instructions in the
  16408.                                    Microsoft Product Assistance Request
  16409.                                    form at the back of C for Yourself,
  16410.                                    included in the QuickC version 2.5
  16411.                                    package.
  16412.  
  16413.  L1061                             out of memory for /INCREMENTAL
  16414.  
  16415.                                    The linker ran out of memory when trying
  16416.                                    to process the additional information
  16417.                                    required for ILINK support.
  16418.  
  16419.                                    Disable incremental linking.
  16420.  
  16421.  L1062                             too many symbols for /INCREMENTAL
  16422.  
  16423.                                    The program had more symbols than can be
  16424.                                    stored in the .SYM file.
  16425.  
  16426.                                    Reduce the number of symbols or disable
  16427.                                    incremental linking.
  16428.  
  16429.  L1063                             out of memory for CodeView information
  16430.  
  16431.                                    The linker was given too many object
  16432.                                    files with debug information, and the
  16433.                                    linker ran out of space to store them.
  16434.  
  16435.                                    Reduce the number of object files that
  16436.                                    have full debug information by compiling
  16437.                                    some files with either /Zd instead of
  16438.                                    /Zi or with no CodeView option at all.
  16439.  
  16440.  L1064                             out of memory
  16441.  
  16442.                                    The linker was not able to allocate
  16443.                                    enough memory from the operating system
  16444.                                    to link the program.
  16445.  
  16446.                                    Reduce the size of the program in terms
  16447.                                    of code, data, and symbols.
  16448.  
  16449.  L1070                             'segment' : segment size exceeds 64K
  16450.  
  16451.                                    A single segment contained more than 64K
  16452.                                    of code or data.
  16453.  
  16454.                                    Try changing the memory model to use far
  16455.                                    code or data as appropriate. If the
  16456.                                    program is in C, use the /NT option or
  16457.                                    the #pragma alloc_text to build smaller
  16458.                                    segments.
  16459.  
  16460.  L1071                             segment _TEXT larger than 65520 bytes
  16461.  
  16462.                                    This error is likely to occur only in
  16463.                                    small-model C programs, but it can occur
  16464.                                    when any program with a segment named
  16465.                                    _TEXT is linked using the /DOSSEG option
  16466.                                    of the QLINK command.
  16467.  
  16468.                                    Small-model C programs must reserve code
  16469.                                    addresses 0 and 1; this range is
  16470.                                    increased to 16 for alignment purposes.
  16471.  
  16472.  Number                            Fatal Error Message
  16473.  ────────────────────────────────────────────────────────────────────────────
  16474.  L1071                             (continued)
  16475.  
  16476.                                    Try compiling and linking using the
  16477.                                    medium or large model. If the program is
  16478.                                    in C, use the /NT option or the #pragma
  16479.                                    alloc_text to build smaller segments.
  16480.  
  16481.  L1072                             common area longer than 65536 bytes
  16482.  
  16483.                                    The program had more than 64K of
  16484.                                    communal variables. This error can occur
  16485.                                    in a multi-module program when the total
  16486.                                    size of communal variables for all
  16487.                                    modules exceeds 64K.
  16488.  
  16489.  L1074                             'group' : group larger than 64K
  16490.  
  16491.                                    The given group exceeds the limit of
  16492.                                    65,535 bytes.
  16493.  
  16494.                                    Reduce the size of the group, or remove
  16495.                                    any unneeded segments from the group.
  16496.                                    Refer to the map file for a listing of
  16497.                                    segments.
  16498.  
  16499.  L1078                             file-segment alignment too small
  16500.  
  16501.                                    The segment-alignment size given with
  16502.                                    the /ALIGNMENT:number option was too
  16503.                                    small.
  16504.  
  16505.                                    Try increasing the number.
  16506.  
  16507.  L1080                             cannot open list file
  16508.  
  16509.                                    The disk or the root directory was full.
  16510.  
  16511.                                    Delete or move files to make space.
  16512.  
  16513.  L1081                             out of space for run file
  16514.  
  16515.                                    The disk on which the .EXE file was
  16516.                                    being written was full.
  16517.  
  16518.                                    Free more space on the disk and restart
  16519.                                    the linker.
  16520.  
  16521.  L1083                             cannot open run file
  16522.  
  16523.                                    One of the following has occurred:
  16524.  
  16525.                                    ■ The disk or the root directory was
  16526.                                    full. Delete or move files to make space.
  16527.  
  16528.                                    ■ Another process has opened the file as
  16529.                                    a read-only file.
  16530.  
  16531.  L1084                             cannot create temporary file
  16532.  
  16533.                                    The disk or root directory was full.
  16534.  
  16535.                                    Free more space in the directory and
  16536.                                    restart the linker.
  16537.  
  16538.  Number                            Fatal Error Message
  16539.  ────────────────────────────────────────────────────────────────────────────
  16540.  L1085                             cannot open temporary file
  16541.  
  16542.                                    The disk or the root directory was full.
  16543.  
  16544.                                    Delete or move files to make space.
  16545.  
  16546.  L1086                             scratch file missing
  16547.  
  16548.                                    An internal error has occurred.
  16549.  
  16550.                                    Note the circumstances of the error and
  16551.                                    notify Microsoft Corporation by
  16552.                                    following the instructions in the
  16553.                                    Microsoft Product Assistance Request
  16554.                                    form at the back of C for Yourself,
  16555.                                    included in the QuickC version 2.5
  16556.                                    package.
  16557.  
  16558.  L1087                             unexpected end-of-file on scratch file
  16559.  
  16560.                                    The disk with the temporary
  16561.                                    linker-output file was removed.
  16562.  
  16563.  L1088                             out of space for list file
  16564.  
  16565.                                    The disk where the listing file was
  16566.                                    being written is full.
  16567.  
  16568.                                    Free more space on the disk and restart
  16569.                                    the linker.
  16570.  
  16571.  L1089                             'filename' : cannot open response file
  16572.  
  16573.                                    The linker could not find the specified
  16574.                                    response file.
  16575.  
  16576.                                    Check that the name of the response file
  16577.                                    is spelled correctly.
  16578.  
  16579.  L1090                             cannot reopen list file
  16580.  
  16581.                                    The original disk was not replaced at
  16582.                                    the prompt.
  16583.  
  16584.                                    Restart the linker.
  16585.  
  16586.  L1091                             unexpected end-of-file on library
  16587.  
  16588.                                    The disk containing the library was
  16589.                                    probably removed.
  16590.  
  16591.                                    Replace the disk containing the library
  16592.                                    and run the linker again.
  16593.  
  16594.  L1092                             cannot open module-definition file
  16595.  
  16596.                                    The linker could not open the
  16597.                                    module-definition file specified on the
  16598.                                    command line or in the response file.
  16599.  
  16600.  L1093                             'filename' : object not found
  16601.  
  16602.                                    One of the object files specified in the
  16603.                                    linker input was not found.
  16604.  
  16605.                                    Restart the linker and specify the
  16606.                                    object file.
  16607.  
  16608.  Number                            Fatal Error Message
  16609.  ────────────────────────────────────────────────────────────────────────────
  16610.  L1094                             'filename' : cannot open file for
  16611.                                    writing
  16612.  
  16613.                                    The linker was unable to open the file
  16614.                                    with write permission.
  16615.  
  16616.                                    Check file permissions.
  16617.  
  16618.  L1095                             'filename' : out of space on file
  16619.  
  16620.                                    The linker ran out of disk space for the
  16621.                                    specified output file.
  16622.  
  16623.                                    Delete or move files to make space.
  16624.  
  16625.  L1100                             stub .EXE file invalid
  16626.  
  16627.                                    The file specified in the STUB statement
  16628.                                    is not a valid real-mode executable file.
  16629.  
  16630.  L1101                             invalid object module
  16631.  
  16632.                                    One of the object modules was invalid.
  16633.  
  16634.                                    Check that the correct version of the
  16635.                                    linker is being used.
  16636.  
  16637.                                    If the error persists after recompiling,
  16638.                                    note the circumstances of the error and
  16639.                                    notify Microsoft Corporation by
  16640.                                    following the instructions in the
  16641.                                    Microsoft Product Assistance Request
  16642.                                    form at the back of C for Yourself,
  16643.                                    included in the QuickC version 2.5
  16644.                                    package.
  16645.  
  16646.  L1102                             unexpected end-of-file
  16647.  
  16648.                                    An invalid format for a library was
  16649.                                    encountered.
  16650.  
  16651.  L1103                             attempt to access data outside segment
  16652.                                    bounds
  16653.  
  16654.                                    A data record in an object module
  16655.                                    specified data extending beyond the end
  16656.                                    of a segment. This is a translator error.
  16657.  
  16658.                                    Note which translator (compiler or
  16659.                                    assembler) produced the incorrect object
  16660.                                    module and the circumstances in which it
  16661.                                    was produced. Please report this error
  16662.                                    to Microsoft Corporation by following
  16663.                                    the instructions in the Microsoft
  16664.                                    Product Assistance Request form at the
  16665.                                    back of one of your manuals.
  16666.  
  16667.  L1104                             'filename' : not valid library
  16668.  
  16669.                                    The specified file was not a valid
  16670.                                    library file. This error causes the
  16671.                                    linker to abort.
  16672.  
  16673.  L1105                             invalid object due to aborted
  16674.                                    incremental compile
  16675.  
  16676.                                    Delete the object file, recompile the
  16677.                                    program, and relink.
  16678.  
  16679.  Number                            Fatal Error Message
  16680.  ────────────────────────────────────────────────────────────────────────────
  16681.  L1113                             unresolved COMDEF; internal error
  16682.  
  16683.                                    Note the circumstances of the error and
  16684.                                    notify Microsoft Corporation by
  16685.                                    following the instructions in the
  16686.                                    Microsoft Product Assistance Request
  16687.                                    form at the back of one of your manuals.
  16688.  
  16689.  L1114                             file not suitable for /EXEPACK; relink
  16690.                                    without
  16691.  
  16692.                                    For the linked program, the size of the
  16693.                                    packed load image plus packing overhead
  16694.                                    was larger than that of the unpacked
  16695.                                    load image.
  16696.  
  16697.                                    Relink without the /EXEPACK option.
  16698.  
  16699.  L1115                             'option' : option incompatible with
  16700.                                    overlays
  16701.  
  16702.                                    The given option is not compatible with
  16703.                                    overlays.
  16704.  
  16705.                                    Remove the option or else do not use
  16706.                                    overlaid modules.
  16707.  
  16708.  L1123                             'segment' : segment defined for both 16-
  16709.                                    and 32-bit
  16710.  
  16711.                                    This error can occur when a segment is
  16712.                                    defined as a 32-bit assembly-language
  16713.                                    module and as a 16-bit segment in a C
  16714.                                    module (16 bits is the default in
  16715.                                    QuickC).
  16716.  
  16717.                                    Define the segment as either 16-bit or
  16718.                                    32-bit.
  16719.  
  16720.  L1127                             far segment references not allowed with
  16721.                                    /TINY
  16722.  
  16723.                                    The /TINY option (causing the linker to
  16724.                                    produce a .COM file) was used with
  16725.                                    modules that have a far segment
  16726.                                    reference.
  16727.  
  16728.                                    Far segment references are not
  16729.                                    compatible with the .COM file format.
  16730.                                    High-level-language modules cause this
  16731.                                    error (unless the language supports the
  16732.                                    tiny memory model). Assembly code
  16733.                                    referencing a segment address also
  16734.                                    produces this error.
  16735.  
  16736.                                    For example:
  16737.  
  16738.                                    mov     ax, seg mydata
  16739.  
  16740.  L1200                             .SYM seek error
  16741.  
  16742.                                    The .SYM file could not be properly read.
  16743.  
  16744.                                    Try performing a full link with the
  16745.                                    /INCREMENTAL option.
  16746.  
  16747.  L1201                             .SYM read error
  16748.  
  16749.                                    The .SYM file could not be properly read.
  16750.  
  16751.                                    Try performing a full link with the
  16752.                                    /INCREMENTAL option.
  16753.  
  16754.  Number                            Fatal Error Message
  16755.  ────────────────────────────────────────────────────────────────────────────
  16756.  L1202                             .SYM write error
  16757.  
  16758.                                    The disk is full, or the .SYM file
  16759.                                    already exists and has the READONLY
  16760.                                    attribute.
  16761.  
  16762.  L1203                             map for segment 'segment' exceeds 64K
  16763.  
  16764.                                    The symbolic information associated with
  16765.                                    the given segment exceeds 64K, which is
  16766.                                    greater than ILINK can handle.
  16767.  
  16768.  L1204                             .ILK write error
  16769.  
  16770.                                    The disk is full, or the .SYM file
  16771.                                    already exists and has the READONLY
  16772.                                    attribute.
  16773.  
  16774.  L1205                             fix-up overflow at 'offset' in segment
  16775.                                    'segment'
  16776.  
  16777.                                    A FIXUPP object record with the given
  16778.                                    location referred to a target too far
  16779.                                    away to be correctly processed.
  16780.  
  16781.                                    This message indicates an error in
  16782.                                    translation by the compiler or assembler.
  16783.  
  16784.  L1206                             .ILK seek error
  16785.  
  16786.                                    The .ILK file is corrupted.
  16787.  
  16788.                                    Perform a full link.
  16789.  
  16790.                                    If the error persists, note the
  16791.                                    circumstances of the error and notify
  16792.                                    Microsoft Corporation by following the
  16793.                                    instructions in the Microsoft Product
  16794.                                    Assistance Request form at the back of C
  16795.                                    for Yourself, included in the QuickC
  16796.                                    version 2.5 package.
  16797.  
  16798.  L1207                             .ILK file too large
  16799.  
  16800.                                    The .ILK file is too large for ILINK to
  16801.                                    process.
  16802.  
  16803.                                    Perform a full link, or reduce the
  16804.                                    number of modules in the project. The
  16805.                                    size limit for a .ILK file is 64K.
  16806.  
  16807.  L1208                             invalid .SYM file
  16808.  
  16809.                                    The .SYM file is invalid.
  16810.  
  16811.                                    Delete the file and perform a full link.
  16812.  
  16813.                                    If the problem persists, note the
  16814.                                    circumstances of the error and notify
  16815.                                    Microsoft Corporation by following the
  16816.                                    instructions in the Microsoft Product
  16817.                                    Assistance Request form at the back of C
  16818.                                    for Yourself, included in the QuickC
  16819.                                    version 2.5 package.
  16820.  
  16821.  Number                            Fatal Error Message
  16822.  ────────────────────────────────────────────────────────────────────────────
  16823.  L1209                             .OBJ close error
  16824.  
  16825.                                    The operating system returned an error
  16826.                                    when ILINK attempted to close one of the
  16827.                                    .OBJ files.
  16828.  
  16829.  L1210                             .OBJ read error
  16830.  
  16831.                                    The .OBJ file has an unreadable
  16832.                                    structure.
  16833.  
  16834.                                    Try rebuilding the .OBJ file and
  16835.                                    performing a full link. This message
  16836.                                    indicates an error in translation by the
  16837.                                    compiler or assembler.
  16838.  
  16839.  L1211                             too many LNAMEs
  16840.  
  16841.                                    An object module has more than 255 LNAME
  16842.                                    records.
  16843.  
  16844.                                    There may be too many logical segment
  16845.                                    definitions with different class names,
  16846.                                    or too many group definitions.
  16847.  
  16848.  L1212                             too many SEGDEFs
  16849.  
  16850.                                    The given object module has more than
  16851.                                    100 SEGDEF records. A SEGDEF record
  16852.                                    defines logical segments.
  16853.  
  16854.  L1213                             too many GRPDEFs
  16855.  
  16856.                                    The given object module has more than 10
  16857.                                    GRPDEF records. A GRPDEF record defines
  16858.                                    physical segments.
  16859.  
  16860.  L1214                             too many COMDEFs
  16861.  
  16862.                                    The total number of COMDEF and EXTDEF
  16863.                                    records exceeded the limit.
  16864.  
  16865.                                    The limit on the total of COMDEF records
  16866.                                    (communal data variables) and EXTDEF
  16867.                                    records (external references) is 1,023.
  16868.  
  16869.                                    Use fewer communal or external variables.
  16870.  
  16871.  L1215                             too many EXTDEFs
  16872.  
  16873.                                    The total number of COMDEF and EXTDEF
  16874.                                    records exceeded the limit.
  16875.  
  16876.                                    The limit on the total of COMDEF records
  16877.                                    (communal data variables) and EXTDEF
  16878.                                    records (external references) is 1,023.
  16879.  
  16880.                                    Use fewer communal or external variables.
  16881.  
  16882.  L1216                             symbol 'symbol' multiply defined
  16883.  
  16884.                                    The given symbol is defined more than
  16885.                                    once.
  16886.  
  16887.  Number                            Fatal Error Message
  16888.  ────────────────────────────────────────────────────────────────────────────
  16889.  L1217                             internal error #3
  16890.  
  16891.                                    Note the circumstances of the error and
  16892.                                    notify Microsoft Corporation by
  16893.                                    following the instructions in the
  16894.                                    Microsoft Product Assistance Request
  16895.                                    form at the back of C for Yourself,
  16896.                                    included in the QuickC version 2.5
  16897.                                    package.
  16898.  
  16899.  L1218                             .EXE file too big, change alignment
  16900.  
  16901.                                    The segment-sector alignment value in
  16902.                                    the .EXE file is too small to express
  16903.                                    the size of one of the segments.
  16904.  
  16905.                                    Perform a full link and increase the
  16906.                                    alignment value with the /ALIGNMENT
  16907.                                    option to QLINK.
  16908.  
  16909.  L1219                             too many library files
  16910.  
  16911.                                    The number of libraries (.LIB files)
  16912.                                    exceeded ILINK's limit of 32 libraries.
  16913.  
  16914.                                    Reduce the number of libraries.
  16915.  
  16916.  L1220                             seek error on library
  16917.  
  16918.                                    A library (.LIB file) is corrupted.
  16919.  
  16920.                                    Perform a full link and check the .LIB
  16921.                                    files.
  16922.  
  16923.  L1221                             library close error
  16924.  
  16925.                                    The operating system returned an error
  16926.                                    when ILINK attempted to close one of the
  16927.                                    libraries (.LIB files).
  16928.  
  16929.                                    Perform a full link.
  16930.  
  16931.                                    If the error persists, note the
  16932.                                    circumstances of the error and notify
  16933.                                    Microsoft Corporation by following the
  16934.                                    instructions in the Microsoft Product
  16935.                                    Assistance Request form at the back of C
  16936.                                    for Yourself, included in the QuickC
  16937.                                    version 2.5 package.
  16938.  
  16939.  L1222                             error closing .EXE file
  16940.  
  16941.                                    The operating system returned an error
  16942.                                    when ILINK attempted to close the
  16943.                                    exe-cutable file.
  16944.  
  16945.                                    Perform a full link.
  16946.  
  16947.                                    If the error persists, note the
  16948.                                    circumstances of the error and notify
  16949.                                    Microsoft Corporation by following the
  16950.                                    instructions in the Microsoft Product
  16951.                                    Assistance Request form at the back of C
  16952.                                    for Yourself, included in the QuickC
  16953.                                    version 2.5 package.
  16954.  
  16955.  Number                            Fatal Error Message
  16956.  ────────────────────────────────────────────────────────────────────────────
  16957.  L1223                             cannot update time on 'filename'
  16958.  
  16959.                                    The operating system returned an error
  16960.                                    when ILINK attempted to update the time
  16961.                                    on the given file. Possibly the file had
  16962.                                    the READONLY attribute set.
  16963.  
  16964.  L1224                             invalid flag 'character'
  16965.  
  16966.                                    The syntax on the ILINK command line was
  16967.                                    incorrect.
  16968.  
  16969.  L1225                             only one /E command allowed
  16970.  
  16971.                                    The ILINK command line contained more
  16972.                                    than one /E option specification.
  16973.  
  16974.  L1226                             terminated by user
  16975.  
  16976.                                    CTRL+C or CTRL+BREAK was pressed,
  16977.                                    interrupting ILINK.
  16978.  
  16979.  L1227                             file 'filename' write protected
  16980.  
  16981.                                    The .EXE, .ILK, or .SYM file that ILINK
  16982.                                    attempted to update has the  READONLY
  16983.                                    attribute.
  16984.  
  16985.  L1228                             file 'filename' missing
  16986.  
  16987.                                    ILINK could not find one of the .OBJ
  16988.                                    files specified on the command line.
  16989.  
  16990.  L1229                             invalid .OBJ format
  16991.  
  16992.                                    Possible causes of this error include
  16993.                                    the following:
  16994.  
  16995.                                    ■ Error in compiler translation
  16996.  
  16997.                                    ■ Corrupted object file
  16998.  
  16999.                                    ■ Invalid object file (possibly text
  17000.                                    file)
  17001.  
  17002.                                    ■ Missing or unreadable object file
  17003.  
  17004.  L1230                             invalid 'filename' record: position = '
  17005.                                    address'
  17006.  
  17007.                                    The given .OBJ file has an invalid
  17008.                                    format or one unrecognized by ILINK.
  17009.                                    This message may indicate an error in
  17010.                                    translation by the compiler or assembler.
  17011.  
  17012.  L1231                             file 'filename' was not full linked
  17013.  
  17014.                                    An .OBJ file specified in the ILINK
  17015.                                    command line was not in the list of
  17016.                                    files in the most recent full link.
  17017.  
  17018.  Number                            Fatal Error Message
  17019.  ────────────────────────────────────────────────────────────────────────────
  17020.  L1232                             cannot run 'program'
  17021.  
  17022.                                    ILINK is unable to execute a program
  17023.                                    specified for execution with the /E
  17024.                                    command-line option.
  17025.  
  17026.                                    Make sure the program is in the search
  17027.                                    path and is a .EXE or .COM file.
  17028.  
  17029.  L1233                             'program' returned 'returncode'
  17030.  
  17031.                                    The given program was specified with the
  17032.                                    /E option. When ILINK executed this
  17033.                                    program, it terminated with the given
  17034.                                    nonzero return code. ILINK cannot
  17035.                                    continue to the next commands, if any.
  17036.  
  17037.  L1234                             error creating 'filename'
  17038.  
  17039.                                    ILINK was unable to create the batch
  17040.                                    file for executing the /E commands.
  17041.  
  17042.                                    Make sure the environment variable TMP
  17043.                                    or TEMP points to a directory that
  17044.                                    exists and can be written to.
  17045.  
  17046.  L1235                             error writing to 'filename'
  17047.  
  17048.                                    An error occurred while ILINK was
  17049.                                    writing the batch file for executing the
  17050.                                    /E commands.
  17051.  
  17052.                                    Make sure the drive for TMP or TEMP or
  17053.                                    the current drive has enough free space.
  17054.  
  17055.  L1236                             file name exceeds 260
  17056.  
  17057.                                    A file name can only have 260 characters.
  17058.  
  17059.                                    Reduce the length of the file name.
  17060.  
  17061.  L1237                             /I given, cannot proceed
  17062.  
  17063.                                    The use specified in the command-line /I
  17064.                                    option is preventing ILINK from calling
  17065.                                    QLINK in case of incremental violation.
  17066.  
  17067.  L1238                             project file missing
  17068.  
  17069.                                    No project name was specified on the
  17070.                                    ILINK command line.
  17071.  
  17072.                                    Check the syntax of the command line.
  17073.                                    The project file must be listed after
  17074.                                    any options and before an optional
  17075.                                    module list.
  17076.  
  17077.  Number                            Fatal Error Message
  17078.  ────────────────────────────────────────────────────────────────────────────
  17079.  L1240                             far references in STRUC fields not
  17080.                                    supported
  17081.  
  17082.                                    ILINK currently does not support STRUC
  17083.                                    definitions like the following:
  17084.  
  17085.                                    extrn   func:FAR
  17086.                                        rek     STRUC
  17087.                                        far_adr DD      func    ;
  17088.                                    Initialized far address
  17089.                                                                ;   within a
  17090.                                    STRUC
  17091.                                        rek     ENDS
  17092.  
  17093.                                    To use ILINK, change the code to get rid
  17094.                                    of the far address within the STRUC.
  17095.  
  17096.  L1241                             too many defined segments
  17097.  
  17098.                                    ILINK has a limit of 255 physical
  17099.                                    segments (that is, segments defined in
  17100.                                    the object module as opposed to groups
  17101.                                    or logical segments).
  17102.  
  17103.                                    To use ILINK, reduce the number of
  17104.                                    segments.
  17105.  
  17106.  L1242                             too many modules
  17107.  
  17108.                                    The program exceeds ILINK's limit of
  17109.                                    1,024 modules.
  17110.  
  17111.                                    Reduce the number of modules.
  17112.  
  17113.  L1243                             cannot link 64K-length segments
  17114.  
  17115.                                    The program has a segment larger than
  17116.                                    65,535 bytes.
  17117.  
  17118.  L1244                             cannot link iterated segments
  17119.  
  17120.                                    ILINK cannot handle programs linked with
  17121.                                    the /EXEPACK linker option.
  17122.  
  17123.  L1245                             forward reference in STRUCT field not
  17124.                                    supported
  17125.  
  17126.                                    An .OBJ file contains a near fix-up (one
  17127.                                    that does not force a .EXE fix-up) whose
  17128.                                    target is a symbol in a .OBJ file which
  17129.                                    ILINK cannot find. This is called a
  17130.                                    "breaking" error.
  17131.  
  17132.                                    Change the code by removing the forward
  17133.                                    reference. Do this by reversing the
  17134.                                    order of the .OBJ files and performing a
  17135.                                    full link.
  17136.  
  17137.  
  17138.  D.4.2  Error Messages
  17139.  
  17140.  Number                            Error Message
  17141.  ────────────────────────────────────────────────────────────────────────────
  17142.  L2000                             imported starting address
  17143.  
  17144.                                    The program starting address as
  17145.                                    specified in the END statement in a MASM
  17146.                                    file is an imported routine.
  17147.  
  17148.  L2002                             fix-up overflow at 'number' in segment '
  17149.                                    segment'
  17150.  
  17151.                                    This error message will be followed by
  17152.                                    either
  17153.  
  17154.                                    target external 'symbol'
  17155.  
  17156.                                    or
  17157.  
  17158.                                    frm seg name1, tgt seg name2, tgt offset
  17159.                                    number
  17160.  
  17161.                                    A fix-up overflow is an attempted
  17162.                                    reference to code or data that is
  17163.                                    impossible because the source location
  17164.                                    (where the reference is made "from") and
  17165.                                    the target address (where the reference
  17166.                                    is made "to") are too far apart. Usually
  17167.                                    the problem is corrected by examining
  17168.                                    the source location.
  17169.  
  17170.                                    Revise the source file and recreate the
  17171.                                    object file. (For information about
  17172.                                    frame and target segments, see the
  17173.                                    Microsoft MS-DOS Programmer's Reference.)
  17174.  
  17175.  L2003                             intersegment self-relative fix-up at '
  17176.                                    number' in segment 'segment'
  17177.  
  17178.                                    The program issued a near call or jump
  17179.                                    to a label in a different segment.
  17180.  
  17181.                                    This error most often occurs when
  17182.                                    specifically declaring an external
  17183.                                    procedure to be near that should be
  17184.                                    declared as far.
  17185.  
  17186.  L2005                             fix-up type unsupported at 'number' in
  17187.                                    segment 'segment'
  17188.  
  17189.                                    A fix-up type occurred that is not
  17190.                                    supported by the linker. This is
  17191.                                    probably a compiler error.
  17192.  
  17193.                                    Note the circumstances of the error and
  17194.                                    notify Microsoft Corporation by
  17195.                                    following the instructions in the
  17196.                                    Microsoft Product Assistance Request
  17197.                                    form at the back of C for Yourself,
  17198.                                    included in the QuickC version 2.5
  17199.                                    package.
  17200.  
  17201.  L2010                             too many fix-ups in LIDATA record
  17202.  
  17203.                                    The number of far relocations (pointer-
  17204.                                    or base-type) in an LIDATA record
  17205.                                    exceeds the limit imposed by the linker.
  17206.  
  17207.                                    This is typically produced by the DUP
  17208.                                    statement in a .ASM file. The limit is
  17209.                                    dynamic: a 1,024-byte buffer is shared
  17210.                                    by relocations and the contents of the
  17211.                                    LIDATA record; there are eight bytes per
  17212.                                    relocation.
  17213.  
  17214.                                    Reduce the number of far relocations in
  17215.                                    the DUP statement.
  17216.  
  17217.  Number                            Error Message
  17218.  ────────────────────────────────────────────────────────────────────────────
  17219.  L2011                             'identifier' : NEAR/HUGE conflict
  17220.  
  17221.                                    Conflicting NEAR and HUGE attributes
  17222.                                    were given for a communal variable.
  17223.  
  17224.  L2012                             'arrayname' : array-element size
  17225.                                    mismatch
  17226.  
  17227.                                    A far communal array was declared with
  17228.                                    two or more different array-element
  17229.                                    sizes (for instance, an array was
  17230.                                    declared once as an array of characters
  17231.                                    and once as an array of real numbers).
  17232.                                    This error occurs only with the
  17233.                                    Microsoft FORTRAN Compiler and any other
  17234.                                    compiler that supports far communal
  17235.                                    arrays.
  17236.  
  17237.  L2013                             LIDATA record too large
  17238.  
  17239.                                    An LIDATA record contained more than 512
  17240.                                    bytes. This is probably a compiler error.
  17241.  
  17242.                                    Note the circumstances of the error and
  17243.                                    notify Microsoft Corporation by
  17244.                                    following the instructions in the
  17245.                                    Microsoft Product Assistance Request
  17246.                                    form at the back of C for Yourself,
  17247.                                    included in the QuickC version 2.5
  17248.                                    package.
  17249.  
  17250.  L2022                             'routine' (alias 'internalname') :
  17251.                                    export undefined
  17252.  
  17253.                                    The internal name of the given exported
  17254.                                    routine is undefined.
  17255.  
  17256.  L2023                             'routine' (alias 'internalname') :
  17257.                                    export imported
  17258.  
  17259.                                    The internal name of the given exported
  17260.                                    routine conflicts with the internal name
  17261.                                    of a previously imported routine. The
  17262.                                    set of imported and exported names
  17263.                                    cannot overlap.
  17264.  
  17265.  L2024                             'symbol' : special symbol already
  17266.                                    defined
  17267.  
  17268.                                    The program defined a symbol name
  17269.                                    already used by the linker for one of
  17270.                                    its own low-level symbols. For example,
  17271.                                    the linker generates special symbols
  17272.                                    used in overlay support and other
  17273.                                    operations.
  17274.  
  17275.                                    Choose another name for the symbol to
  17276.                                    avoid conflict.
  17277.  
  17278.  L2025                             'symbol' : symbol defined more than once
  17279.  
  17280.                                    The same symbol has been found in two
  17281.                                    different object files.
  17282.  
  17283.  L2026                             entry ordinal 'number', name 'name' :
  17284.                                    multiple definitions for same ordinal
  17285.  
  17286.                                    The given exported name with the given
  17287.                                    ordinal number conflicted with a
  17288.                                    different exported name previously
  17289.                                    assigned to the same ordinal. Only one
  17290.                                    name can be associated with a particular
  17291.                                    ordinal.
  17292.  
  17293.  Number                            Error Message
  17294.  ────────────────────────────────────────────────────────────────────────────
  17295.  L2027                             'name' : ordinal too large for export
  17296.  
  17297.                                    The given exported name was assigned an
  17298.                                    ordinal that exceeded the limit of
  17299.                                    65,535.
  17300.  
  17301.  L2028                             automatic data segment plus heap exceed
  17302.                                    64K
  17303.  
  17304.                                    The total size of data declared in
  17305.                                    DGROUP, plus the value given in HEAPSIZE
  17306.                                    in the module-definition file, plus the
  17307.                                    stack size given by the /STACK option or
  17308.                                    STACKSIZE module definition-file
  17309.                                    statement, exceeds 64K.
  17310.  
  17311.                                    Reduce near-data allocation, HEAPSIZE,
  17312.                                    or stack.
  17313.  
  17314.  L2029                             'symbol' : unresolved external
  17315.  
  17316.                                    A symbol was declared to be external in
  17317.                                    one or more modules, but it was not
  17318.                                    publicly defined in any module or
  17319.                                    library.
  17320.  
  17321.                                    The name of the unresolved external
  17322.                                    symbol is given, then a list of object
  17323.                                    modules which contain references to this
  17324.                                    symbol. This message and the list are
  17325.                                    written to the map file, if one exists.
  17326.  
  17327.  L2041                             stack plus data exceed 64K
  17328.  
  17329.                                    If the total of near data and requested
  17330.                                    stack size exceeds 64K, the program will
  17331.                                    not run correctly. The linker checks for
  17332.                                    this condition only when /DOSSEG is
  17333.                                    enabled, which is the case in the
  17334.                                    library start-up module for Microsoft
  17335.                                    Language Libraries.
  17336.  
  17337.                                    This is a fatal QLINK error.
  17338.  
  17339.  L2043                             Quick library support module missing
  17340.  
  17341.                                    The required module QUICKLIB.OBJ was
  17342.                                    missing.
  17343.  
  17344.                                    The module QUICKLIB.OBJ must be linked
  17345.                                    in when creating a Quick library.
  17346.  
  17347.  L2044                             'symbol' : symbol multiply defined, use
  17348.                                    /NOE
  17349.  
  17350.                                    The linker found what it interprets as a
  17351.                                    public-symbol redefinition, probably
  17352.                                    because a symbol defined in a library
  17353.                                    was redefined.
  17354.  
  17355.                                    Relink with the /NOEXTDICTIONARY (/NOE)
  17356.                                    option. If error L2025 results for the
  17357.                                    same symbol, then this is a genuine
  17358.                                    symbol-redefinition error.
  17359.  
  17360.  L2045                             'segment' : segment with > 1 class name
  17361.                                    not allowed with /INC
  17362.  
  17363.                                    The program defined a segment more than
  17364.                                    once, giving the segment different class
  17365.                                    names. Different class names for the
  17366.                                    same segment are not allowed when
  17367.                                    linking with the /INCREMENTAL (/INC)
  17368.                                    option.
  17369.  
  17370.  Number                            Error Message
  17371.  ────────────────────────────────────────────────────────────────────────────
  17372.  L2045                             (continued)
  17373.  
  17374.                                    Normally, this error should never appear
  17375.                                    unless programming with MASM. For
  17376.                                    example, the two MASM statements
  17377.  
  17378.                                    _BSS segment 'BSS'
  17379.                                    _BSS segment 'DATA'
  17380.  
  17381.                                    have the effect of defining two distinct
  17382.                                    segments with the same name but
  17383.                                    different classes. This situation is
  17384.                                    incompatible with the /INCREMENTAL
  17385.                                    option.
  17386.  
  17387.  L2048                             Microsoft Overlay Manager module not
  17388.                                    found
  17389.  
  17390.                                    Overlays were designated, but the
  17391.                                    Microsoft Overlay Manager module was not
  17392.                                    found. This module is defined in the
  17393.                                    default library.
  17394.  
  17395.  L2049                             no segments defined
  17396.  
  17397.                                    No code or initialized data was defined
  17398.                                    in the program. The resulting executable
  17399.                                    file is not likely to be valid.
  17400.  
  17401.  L2050                             16/32-bit attribute conflict - segment:
  17402.                                    'segment' in group: 'group'
  17403.  
  17404.                                    A group cannot contain both 16-bit and
  17405.                                    32-bit segments.
  17406.  
  17407.  L2051                             start address not equal to 0x100 for
  17408.                                    /TINY
  17409.  
  17410.                                    The program starting address, as
  17411.                                    specified in the .COM file, must have a
  17412.                                    starting value equal to 100 hex (0x100
  17413.                                    or 0x0100). Any other value is illegal.
  17414.  
  17415.                                    Put the following line of assembly
  17416.                                    source code in front of the code
  17417.                                    segment:
  17418.  
  17419.                                    ORG 100h
  17420.  
  17421.  L2052                             'symbol' : unresolved external -
  17422.                                    possible calling convention mismatch
  17423.  
  17424.                                    A symbol was declared to be external in
  17425.                                    one or more modules, but the linker
  17426.                                    could not find it publicly defined in
  17427.                                    any module or library.
  17428.  
  17429.                                    The name of the unresolved external
  17430.                                    symbol is given, then a list of object
  17431.                                    modules which contain references to this
  17432.                                    symbol. The error message and the list
  17433.                                    are written to the map file, if one
  17434.                                    exists.
  17435.  
  17436.                                    This error occurs when a prototype for
  17437.                                    an externally defined function is
  17438.                                    omitted from a program that is compiled
  17439.                                    with the _fastcall option (/Gr). The
  17440.                                    calling convention for _fastcall does
  17441.                                    not match the assumptions that are made
  17442.                                    when a prototype is not included for an
  17443.                                    external function.
  17444.  
  17445.                                    Either include a prototype for the
  17446.                                    function, or compile without the /Gr
  17447.                                    option.
  17448.  
  17449.  
  17450.  D.4.3  Warning Messages
  17451.  
  17452.  Number                            Warning Message
  17453.  ────────────────────────────────────────────────────────────────────────────
  17454.  L4000                             seg disp. included near 'offset' in
  17455.                                    segment 'segment'
  17456.  
  17457.                                    This is the warning generated by the
  17458.                                    /WARNFIXUP option. See Section 5.5.6,
  17459.                                    "Fixups," for more information.
  17460.  
  17461.  L4001                             frame-relative fix-up, frame ignored
  17462.                                    near 'offset' in segment 'segment'
  17463.  
  17464.                                    A reference was made relative to a
  17465.                                    segment that is different from the
  17466.                                    target segment of the reference.
  17467.  
  17468.                                    For example, if _id1 is defined in
  17469.                                    segment _TEXT, the instruction call
  17470.  
  17471.                                    DGROUP:_id1
  17472.  
  17473.                                    produces this warning. The frame  DGROUP
  17474.                                     is ignored, so the linker treats the
  17475.                                    call as if it were call
  17476.  
  17477.                                    _TEXT:_id1.
  17478.  
  17479.  L4002                             frame-relative absolute fix-up near '
  17480.                                    offset' in segment 'segment'
  17481.  
  17482.                                    A reference was made relative to a
  17483.                                    segment that was different from the
  17484.                                    target segment of the reference, and
  17485.                                    both segments are absolute (defined with
  17486.                                    AT).
  17487.  
  17488.                                    The linker treats the executable file as
  17489.                                    if the file were to run in real mode
  17490.                                    only.
  17491.  
  17492.  L4003                             intersegment self-relative fix-up at '
  17493.                                    offset' in segment 'segment' pos: '
  17494.                                    offset' target external 'name'
  17495.  
  17496.                                    The linker found an intersegment
  17497.                                    self-relative fixup.
  17498.  
  17499.                                    This error may be caused by compiling a
  17500.                                    small-model program with the /NT option.
  17501.  
  17502.  L4004                             possible fix-up overflow at 'offset' in
  17503.                                    segment 'segment'
  17504.  
  17505.                                    A near call/jump was made to another
  17506.                                    segment which was not a member of the
  17507.                                    same group as the segment from which the
  17508.                                    call/jump was made.
  17509.  
  17510.                                    This call/jump can cause an incorrect
  17511.                                    address calculation when the distance
  17512.                                    between the paragraph address (frame
  17513.                                    number) of the segment group and the
  17514.                                    target segment is greater than 64K, even
  17515.                                    when the distance between the segment
  17516.                                    where the call/jump was actually made
  17517.                                    and the target segment is less than 64K.
  17518.  
  17519.  L4010                             invalid alignment specification
  17520.  
  17521.                                    The number specified in the /ALIGNMENT
  17522.                                    option must be a power of 2 in the range
  17523.                                    2-32,768.
  17524.  
  17525.  Number                            Warning Message
  17526.  ────────────────────────────────────────────────────────────────────────────
  17527.  L4011                             PACKCODE value exceeding 65500
  17528.                                    unreliable
  17529.  
  17530.                                    The packing limit specified with the
  17531.                                    /PACKCODE option was between 65,500 and
  17532.                                    65,536. Code segments with a size in
  17533.                                    this range are unreliable on some
  17534.                                    steppings of the 80286 processor.
  17535.  
  17536.  L4012                             /HIGH disables /EXEPACK
  17537.  
  17538.                                    The /HIGH and /EXEPACK options cannot be
  17539.                                    used at the same time.
  17540.  
  17541.  L4015                             /CODEVIEW disables /DSALLOCATE
  17542.  
  17543.                                    The /CODEVIEW and /DSALLOCATE options
  17544.                                    cannot be used at the same time.
  17545.  
  17546.  L4016                             /CODEVIEW disables /EXEPACK
  17547.  
  17548.                                    The /CODEVIEW and /EXEPACK options
  17549.                                    cannot be used at the same time.
  17550.  
  17551.  L4017                             'option' : unrecognized option name;
  17552.                                    option ignored
  17553.  
  17554.                                    An unrecognized character followed the
  17555.                                    option indicator ( / ).
  17556.  
  17557.                                    An example of this warning is
  17558.  
  17559.                                    QLINK /ABCDEF main;
  17560.  
  17561.  L4019                             /TINY disables /INCREMENTAL
  17562.  
  17563.                                    A .COM file always requires a full link
  17564.                                    and cannot be incrementally linked.
  17565.  
  17566.                                    The /TINY and /INCREMENTAL options are
  17567.                                    incompatible. When they are used
  17568.                                    together, the linker ignores the
  17569.                                    /INCREMENTAL option.
  17570.  
  17571.  L4020                             'segment' : code-segment size exceeds
  17572.                                    65500
  17573.  
  17574.                                    Code segments between 65,501 and 65,536
  17575.                                    bytes in length may be unreliable on the
  17576.                                    Intel 80286 processor.
  17577.  
  17578.  L4021                             no stack segment
  17579.  
  17580.                                    The program did not contain a stack
  17581.                                    segment defined with the STACK combine
  17582.                                    type.
  17583.  
  17584.                                    Normally, every program should have a
  17585.                                    stack segment with the combine type
  17586.                                    specified as STACK. This message may be
  17587.                                    ignored if there is a specific reason
  17588.                                    for not defining a stack or for defining
  17589.                                    one without the STACK combine type.
  17590.                                    Linking with versions of LINK earlier
  17591.                                    than 2.40 might cause this message,
  17592.                                    since these linkers search libraries
  17593.                                    only once.
  17594.  
  17595.  Number                            Warning Message
  17596.  ────────────────────────────────────────────────────────────────────────────
  17597.  L4023                             'routine' ('internalname') : export
  17598.                                    internal name conflict
  17599.  
  17600.                                    The internal name of the given exported
  17601.                                    routine conflicted with the internal
  17602.                                    name of a previous import definition or
  17603.                                    export definition.
  17604.  
  17605.  L4024                             'name' : multiple definitions for export
  17606.                                    name
  17607.  
  17608.                                    The given name was exported more than
  17609.                                    once, an action that is not allowed.
  17610.  
  17611.  L4025                             'modulename'.'importname'('internalname')
  17612.                                    : import internal name conflict
  17613.  
  17614.                                    The internal name of the given imported
  17615.                                    routine (import is either a name or a
  17616.                                    number) conflicted with the internal
  17617.                                    name of a previous export or import.
  17618.  
  17619.  L4026                             'modulename'.'importname'('internalname')
  17620.                                    : self-imported
  17621.  
  17622.                                    The given imported routine was imported
  17623.                                    from the module being linked. This is
  17624.                                    not supported on some systems.
  17625.  
  17626.  L4027                             'name' : multiple definitions for import
  17627.                                    internal name
  17628.  
  17629.                                    The given internal name was imported
  17630.                                    more than once. Previous import
  17631.                                    definitions are ignored.
  17632.  
  17633.  L4028                             'segment' : segment already defined
  17634.  
  17635.                                    The given segment was defined more than
  17636.                                    once in the SEGMENTS statement of the
  17637.                                    module-definition file.
  17638.  
  17639.  L4029                             'segment' : DGROUP segment converted to
  17640.                                    type DATA
  17641.  
  17642.                                    The given logical segment in the group
  17643.                                    DGROUP was defined as a code segment.
  17644.  
  17645.                                    DGROUP cannot contain code segments
  17646.                                    because the linker always considers
  17647.                                    DGROUP to be a data segment. The name
  17648.                                    DGROUP is predefined as the automatic
  17649.                                    data segment.
  17650.  
  17651.                                    The linker converts the named segment to
  17652.                                    type "data."
  17653.  
  17654.  L4030                             'segment' : segment attributes changed
  17655.                                    to conform  with automatic data segment
  17656.  
  17657.                                    The given logical segment in the group
  17658.                                    DGROUP was given sharing attributes
  17659.                                    (SHARED/NONSHARED) that differed from
  17660.                                    the automatic data attributes as
  17661.                                    declared by the DATA instance
  17662.                                    specification (SINGLE/MULTIPLE). The
  17663.                                    attributes are converted to conform to
  17664.                                    those of DGROUP.
  17665.  
  17666.                                    The name DGROUP is predefined as the
  17667.                                    automatic data segment. DGROUP cannot
  17668.                                    contain code segments because the linker
  17669.                                    always considers DGROUP to be a data
  17670.                                    segment.
  17671.  
  17672.  Number                            Warning Message
  17673.  ────────────────────────────────────────────────────────────────────────────
  17674.  L4031                             'segment' : segment declared in more
  17675.                                    than one group
  17676.  
  17677.                                    A segment was declared to be a member of
  17678.                                    two different groups.
  17679.  
  17680.                                    Correct the source file and recreate the
  17681.                                    object files.
  17682.  
  17683.  L4032                             'segment' : code-group size exceeds
  17684.                                    65500 bytes
  17685.  
  17686.                                    The given code group has a size between
  17687.                                    65,500 and 65,536 bytes, a size that is
  17688.                                    unreliable on some steppings of the
  17689.                                    80286 processor.
  17690.  
  17691.  L4034                             more than 239 overlay segments; extra
  17692.                                    put in root
  17693.  
  17694.                                    The link command line or response file
  17695.                                    designated too many segments to go into
  17696.                                    overlays.
  17697.  
  17698.                                    The limit on the number of segments that
  17699.                                    can go into overlays is 239. Segments
  17700.                                    starting with the 240th segment are
  17701.                                    assigned to the permanently resident
  17702.                                    portion of the program (the root).
  17703.  
  17704.  L4036                             no automatic data segment
  17705.  
  17706.                                    The application did not define a group
  17707.                                    named DGROUP.
  17708.  
  17709.                                    DGROUP has special meaning to the linker,
  17710.                                    which uses it to identify the auto-
  17711.                                    matic or default data segment used by
  17712.                                    the operating system.
  17713.  
  17714.                                    This warning will not be issued if DATA
  17715.                                    NONE is declared.
  17716.  
  17717.  L4040                             stack size ignored for /TINY
  17718.  
  17719.                                    The linker ignores stack size if the
  17720.                                    /TINY option is given and if the stack
  17721.                                    segment has been defined in front of the
  17722.                                    code segment.
  17723.  
  17724.  L4042                             cannot open old version
  17725.  
  17726.                                    The file specified in the OLD statement
  17727.                                    in the module-definition file could not
  17728.                                    be opened.
  17729.  
  17730.  L4045                             name of output file is 'filename'
  17731.  
  17732.                                    The linker had to change the name of the
  17733.                                    output file to the given file name.
  17734.  
  17735.                                    If the output file is specified without
  17736.                                    an extension, the linker assumes the
  17737.                                    default extension .EXE. Creating a Quick
  17738.                                    library, .DLL file, or .COM file forces
  17739.                                    the
  17740.  
  17741.  Number                            Warning Message
  17742.  ────────────────────────────────────────────────────────────────────────────
  17743.  L4045                             (continued)
  17744.  
  17745.                                    linker to use an extension other than
  17746.                                    .EXE. The output-file specifications and
  17747.                                    corresponding extensions are listed
  17748.                                    below:
  17749.  
  17750.  Output -File Specification        Extension
  17751.  ────────────────────────────────────────────────────────────────────────────
  17752.  /TINY option                      .COM
  17753.  
  17754.  /QUICKLIB option                  .QLB
  17755.  
  17756.  LIBRARY statement in .DEF file    .DLL
  17757.  
  17758.  L4047                             Multiple code segments in module of
  17759.                                    overlaid program incompatible with
  17760.                                    /CODEVIEW
  17761.  
  17762.                                    When debugging with CodeView, if there
  17763.                                    are multiple code segments defined in
  17764.                                    one module (.OBJ file) by use of the
  17765.                                    compiler #pragma alloc_text( ) and the
  17766.                                    program is built as an overlaid program,
  17767.                                    you can access the symbolic information
  17768.                                    for only the first code segment in
  17769.                                    overlay. Symbolic information for the
  17770.                                    rest of the code segments in overlay is
  17771.                                    not accessible.
  17772.  
  17773.  L4050                             too many public symbols for sorting
  17774.  
  17775.                                    The linker uses the stack and all
  17776.                                    available memory in the near heap to
  17777.                                    sort public symbols for the /MAP option.
  17778.                                    If the number of public symbols exceeds
  17779.                                    the space available for them, this
  17780.                                    warning is issued; the symbols are not
  17781.                                    sorted in the map file, but are listed
  17782.                                    in an arbitrary order.
  17783.  
  17784.                                    Reduce the number of symbols.
  17785.  
  17786.  L4051                             'filename' : cannot find library
  17787.  
  17788.                                    The linker could not find the specified
  17789.                                    library file, possibly for one of the
  17790.                                    following reasons:
  17791.  
  17792.                                    ■ The specified file does not exist.
  17793.                                    Enter the name or full path
  17794.                                    specification of a library file.
  17795.  
  17796.                                    ■ The LIB environment variable is not
  17797.                                    set correctly. Check for typographical
  17798.                                    errors, incorrect directory listings,
  17799.                                    and the presence of a space, semicolon,
  17800.                                    or hidden character at the end of the
  17801.                                    line.
  17802.  
  17803.                                    ■ An earlier version of the linker is
  17804.                                    being run. Check the path environment
  17805.                                    variable, and delete or rename earlier
  17806.                                    linkers.
  17807.  
  17808.  Number                            Warning Message
  17809.  ────────────────────────────────────────────────────────────────────────────
  17810.  L4053                             VM.TMP : illegal file name; ignored
  17811.  
  17812.                                    VM.TMP appeared as an object-file name.
  17813.  
  17814.                                    Rename the file and rerun the linker.
  17815.  
  17816.  L4054                             'filename' : cannot find file
  17817.  
  17818.                                    The linker could not find the specified
  17819.                                    file.
  17820.  
  17821.                                    Enter a new file name, a new path
  17822.                                    specification, or both.
  17823.  
  17824.  L4201                             fix-up frame relative to an (as yet)
  17825.                                    undefined symbol - assuming ok
  17826.  
  17827.                                    A reference was made relative to a
  17828.                                    segment that is different from the
  17829.                                    target segment of the reference.
  17830.  
  17831.                                    This error occurs in either of the
  17832.                                    following situations:
  17833.  
  17834.                                    ■ A frame-relative fixup.
  17835.  
  17836.  For example, if _id1 is defined in segment _TEXT, the instruction call
  17837.  DGROUP:_id1 produces this warning. The frame DGROUP is ignored, so the
  17838.  linker treats the call as if it were call _TEXT:_id1.
  17839.  
  17840.                                    ■ A frame-relative absolute fixup.
  17841.  
  17842.  Both segments are absolute (defined with AT). The linker treats the
  17843.  executable file as if the file were to run in real mode only.
  17844.  
  17845.  L4202                             module contains TYPEDEFs - ignored
  17846.  
  17847.                                    The .OBJ file contains type definitions.
  17848.                                    ILINK ignores these records.
  17849.  
  17850.  L4203                             module contains BLKDEFs - ignored
  17851.  
  17852.                                    The .OBJ file contains records no longer
  17853.                                    supported by Microsoft language
  17854.                                    compilers.
  17855.  
  17856.  L4204                             old .EXE free information lost
  17857.  
  17858.                                    The free list in the .EXE file has been
  17859.                                    corrupted. The free list represents
  17860.                                    "holes" in the .EXE file made available
  17861.                                    when segments moved to new locations.
  17862.  
  17863.  L4205                             file 'filename' has no useful
  17864.                                    contribution
  17865.  
  17866.                                    The given module makes no contribution
  17867.                                    to any segment.
  17868.  
  17869.  Number                            Warning Message
  17870.  ────────────────────────────────────────────────────────────────────────────
  17871.  L4206                             main entry point moved
  17872.  
  17873.                                    The program starting address changed.
  17874.  
  17875.                                    Try performing a full link.
  17876.  
  17877.  L4250                             'number' undefined symbols
  17878.  
  17879.                                    A number of symbols were referred to in
  17880.                                    fix-ups but never publicly defined in
  17881.                                    the program. The given number indicates
  17882.                                    how many of these undefined symbols were
  17883.                                    found.
  17884.  
  17885.  L4251                             invalid module reference 'library'
  17886.  
  17887.                                    The program makes a dynamic-link
  17888.                                    reference to a dynamic-link library that
  17889.                                    is not recognized or declared by the
  17890.                                    .EXE file.
  17891.  
  17892.  L4252                             file 'filename' does not exist
  17893.  
  17894.                                    ILINK could not find the given file.
  17895.  
  17896.  L4253                             symbol 'symbol' deleted
  17897.  
  17898.                                    A symbol was deleted from an
  17899.                                    incrementally linked module.
  17900.  
  17901.  L4254                             new segment definition 'segment'
  17902.  
  17903.                                    A segment was added to the program.
  17904.  
  17905.  L4255                             changed segment definition 'segment'
  17906.  
  17907.                                    The segment contribution changed for the
  17908.                                    given module. It contributed to a
  17909.                                    segment to which it did not previously
  17910.                                    contribute, or a segment contribution
  17911.                                    was removed.
  17912.  
  17913.  L4256                             segment 'segment' grew too big
  17914.  
  17915.                                    The given segment grew beyond the
  17916.                                    padding for the given module.
  17917.  
  17918.  L4257                             new group definition 'group'
  17919.  
  17920.                                    A new group was defined via the GROUP
  17921.                                    directive in assembly language or via
  17922.                                    the /ND compiler option for a C program.
  17923.  
  17924.  L4258                             group 'group' changed to include '
  17925.                                    segment'
  17926.  
  17927.                                    The list of segments included in the
  17928.                                    given group changed.
  17929.  
  17930.  Number                            Warning Message
  17931.  ────────────────────────────────────────────────────────────────────────────
  17932.  L4259                             symbol 'symbol' changed
  17933.  
  17934.                                    The given data symbol moved (is now at a
  17935.                                    new address).
  17936.  
  17937.  L4260                             cannot add new communal data symbol '
  17938.                                    symbol'
  17939.  
  17940.                                    A new communal data symbol was added as
  17941.                                    an uninitialized variable in C or with
  17942.                                    the COMM feature in MASM.
  17943.  
  17944.  L4261                             communal variable 'identifier' grew too
  17945.                                    big
  17946.  
  17947.                                    The given communal variable changed size
  17948.                                    too much.
  17949.  
  17950.  L4262                             invalid symbol type for 'symbol'
  17951.  
  17952.                                    A symbol that was previously a code
  17953.                                    symbol became a data symbol or vice
  17954.                                    versa.
  17955.  
  17956.  L4263                             new CodeView symbolic information
  17957.  
  17958.                                    A module previously compiled without /Zi
  17959.                                    was compiled with /Zi.
  17960.  
  17961.  L4264                             new line-number information
  17962.  
  17963.                                    A module previously compiled without /Zi
  17964.                                    or /Zd was compiled with /Zi or /Zd.
  17965.  
  17966.  L4265                             new public CodeView information
  17967.  
  17968.                                    New information on public symbol
  17969.                                    addresses was added.
  17970.  
  17971.  L4266                             invalid .EXE file
  17972.  
  17973.                                    The .EXE file is invalid.
  17974.  
  17975.                                    Make sure the linker is current.
  17976.  
  17977.                                    If the error persists, note the
  17978.                                    circumstances of the error and notify
  17979.                                    Microsoft Corporation by following the
  17980.                                    instructions in the Microsoft Product
  17981.                                    Assistance Request form at the back of C
  17982.                                    for Yourself, included in the QuickC
  17983.                                    version 2.5 package.
  17984.  
  17985.  L4267                             invalid .ILK file
  17986.  
  17987.                                    The .ILK file is invalid.
  17988.  
  17989.                                    Make sure the linker is current.
  17990.  
  17991.                                    If the error persists, note the
  17992.                                    circumstances of the error and notify
  17993.                                    Microsoft Corporation by following the
  17994.                                    instructions in the Microsoft Product
  17995.                                    Assistance Request form at the back of C
  17996.                                    for Yourself, included in the QuickC
  17997.                                    version 2.5 package.
  17998.  
  17999.  Number                            Warning Message
  18000.  ────────────────────────────────────────────────────────────────────────────
  18001.  L4268                             .SYM/.ILK mismatch
  18002.  
  18003.                                    The .SYM and .ILK files are out of sync.
  18004.  
  18005.                                    Make sure the linker is current.
  18006.  
  18007.                                    If the error persists, note the
  18008.                                    circumstances of the error and notify
  18009.                                    Microsoft Corporation by following the
  18010.                                    instructions in the Microsoft Product
  18011.                                    Assistance Request form at the back of C
  18012.                                    for Yourself, included in the QuickC
  18013.                                    version 2.5 package.
  18014.  
  18015.  L4269                             library 'library' has changed
  18016.  
  18017.                                    The given library has changed.
  18018.  
  18019.  L4270                             entry table expansion not implemented
  18020.  
  18021.                                    The program call tree changed in such a
  18022.                                    way that ILINK could not process it
  18023.                                    correctly. This problem is caused by new
  18024.                                    calls to a routine from another routine
  18025.                                    that did not call it before.
  18026.  
  18027.                                    Perform a full link.
  18028.  
  18029.  L4272                             .ILK read error
  18030.  
  18031.                                    The .ILK file does not exist or was not
  18032.                                    in the expected format.
  18033.  
  18034.  L4273                             out of memory
  18035.  
  18036.                                    ILINK ran out of memory for processing
  18037.                                    the input.
  18038.  
  18039.                                    If ILINK is being run through the NMAKE
  18040.                                    utility, try running ILINK outside of
  18041.                                    NMAKE. Otherwise, perform a full link.
  18042.  
  18043.  
  18044.  D.5  LIB Error Messages
  18045.  
  18046.  Error messages generated by the Microsoft Library Manager, LIB, have one of
  18047.  the following formats:
  18048.  
  18049.    {filename |  LIB} :  fatal error U1xxx: messagetext
  18050.    {filename |  LIB} :  warning U4xxx: messagetext
  18051.  
  18052.  The message begins with the input-file name (filename), if one exists, or
  18053.  with the name of the utility. If possible, LIB prints a warning and
  18054.  continues operation. In some cases, errors are fatal and LIB terminates
  18055.  processing. LIB may display the following error messages.
  18056.  
  18057.  
  18058.  D.5.1  LIB Fatal Error Messages
  18059.  
  18060.  Number                            Fatal Error Message
  18061.  ────────────────────────────────────────────────────────────────────────────
  18062.  U1150                             page size too small
  18063.  
  18064.                                    The page size of an input library was
  18065.                                    too small, which indicates an invalid
  18066.                                    input .LIB file.
  18067.  
  18068.  U1151                             syntax error : illegal file
  18069.                                    specification
  18070.  
  18071.                                    A command operator such as a minus sign
  18072.                                    (-) was given without a following module
  18073.                                    name.
  18074.  
  18075.  U1152                             syntax error : option name missing
  18076.  
  18077.                                    A forward slash ( / ) was given without
  18078.                                    an option after it.
  18079.  
  18080.  U1153                             syntax error : option value missing
  18081.  
  18082.                                    The /PAGESIZE option was given without a
  18083.                                    value following it.
  18084.  
  18085.  U1154                             option unknown
  18086.  
  18087.                                    An unknown option was given. Currently,
  18088.                                    LIB recognizes the /PAGESIZE,
  18089.                                    /NOEXTDICTIONARY, /NOIGNORECASE, and
  18090.                                    /IGNORECASE options.
  18091.  
  18092.  U1155                             syntax error : illegal input
  18093.  
  18094.                                    The given command did not follow correct
  18095.                                    LIB syntax as specified in Chapter 6,
  18096.                                    "LIB."
  18097.  
  18098.  U1156                             syntax error
  18099.  
  18100.                                    The given command did not follow correct
  18101.                                    LIB syntax as specified in Chapter 6,
  18102.                                    "LIB."
  18103.  
  18104.  U1157                             comma or newline missing
  18105.  
  18106.                                    A comma or carriage return was expected
  18107.                                    in the command line but did not appear.
  18108.                                    This may indicate an inappropriately
  18109.                                    placed comma, as in the following line:
  18110.  
  18111.                                    LIB math.lib,-mod1+mod2;
  18112.  
  18113.                                    The line should have been entered as
  18114.                                    follows:
  18115.  
  18116.                                    LIB math.lib -mod1+mod2;
  18117.  
  18118.  Number                            Fatal Error Message
  18119.  ────────────────────────────────────────────────────────────────────────────
  18120.  U1158                             terminator missing
  18121.  
  18122.                                    Either the response to the "Output
  18123.                                    library" prompt or the last line of the
  18124.                                    response file used to start LIB did not
  18125.                                    end with a carriage return.
  18126.  
  18127.  U1161                             cannot rename old library
  18128.  
  18129.                                    LIB could not rename the old library to
  18130.                                    have a .BAK extension because the .BAK
  18131.                                    version already existed with read-only
  18132.                                    protection.
  18133.  
  18134.                                    Change the protection on the old .BAK
  18135.                                    version.
  18136.  
  18137.  U1162                             cannot reopen library
  18138.  
  18139.                                    The old library could not be reopened
  18140.                                    after it was renamed to have a .BAK
  18141.                                    extension.
  18142.  
  18143.  U1163                             error writing to cross-reference file
  18144.  
  18145.                                    The disk or root directory was full.
  18146.  
  18147.                                    Delete or move files to make space.
  18148.  
  18149.  U1170                             too many symbols
  18150.  
  18151.                                    More than 4,609 symbols appeared in the
  18152.                                    library file.
  18153.  
  18154.  U1171                             insufficient memory
  18155.  
  18156.                                    LIB did not have enough memory to run.
  18157.  
  18158.                                    Remove any shells or resident programs
  18159.                                    and try again, or add more memory.
  18160.  
  18161.  U1172                             no more virtual memory
  18162.  
  18163.                                    The current library exceeds the 512K
  18164.                                    limit imposed by LIB.
  18165.  
  18166.                                    Reduce the number of object modules.
  18167.  
  18168.  U1173                             internal failure
  18169.  
  18170.                                    Note the circumstances of the failure
  18171.                                    and notify Microsoft Corporation by
  18172.                                    using the Microsoft Product Assistance
  18173.                                    Request form at the back of C for
  18174.                                    Yourself, included in the QuickC version
  18175.                                    2.5 package.
  18176.  
  18177.  U1174                             mark: not allocated
  18178.  
  18179.                                    Note the circumstances of the failure
  18180.                                    and notify Microsoft Corporation by
  18181.                                    using the Microsoft Product Assistance
  18182.                                    Request form at the back of C for
  18183.                                    Yourself, included in the QuickC version
  18184.                                    2.5 package.
  18185.  
  18186.  Number                            Fatal Error Message
  18187.  ────────────────────────────────────────────────────────────────────────────
  18188.  U1175                             free: not allocated
  18189.  
  18190.                                    Note the circumstances of the failure
  18191.                                    and notify Microsoft Corporation by
  18192.                                    using the Microsoft Product Assistance
  18193.                                    Request form at the back of C for
  18194.                                    Yourself, included in the QuickC version
  18195.                                    2.5 package.
  18196.  
  18197.  U1180                             write to extract file failed
  18198.  
  18199.                                    The disk or root directory was full.
  18200.  
  18201.                                    Delete or move files to make space.
  18202.  
  18203.  U1181                             write to library file failed
  18204.  
  18205.                                    The disk or root directory was full.
  18206.  
  18207.                                    Delete or move files to make space.
  18208.  
  18209.  U1182                             'filename' : cannot create extract file
  18210.  
  18211.                                    The disk or root directory was full, or
  18212.                                    the specified extract file already
  18213.                                    existed with read-only protection.
  18214.  
  18215.                                    Make space on the disk or change the
  18216.                                    protection of the extract file.
  18217.  
  18218.  U1183                             cannot open response file
  18219.  
  18220.                                    The response file was not found.
  18221.  
  18222.  U1184                             unexpected end-of-file on command input
  18223.  
  18224.                                    An end-of-file character was received
  18225.                                    prematurely in response to a prompt.
  18226.  
  18227.  U1185                             cannot create new library
  18228.  
  18229.                                    The disk or root directory was full, or
  18230.                                    the library file already existed with
  18231.                                    read-only protection.
  18232.  
  18233.                                    Make space on the disk or change the
  18234.                                    protection of the library file.
  18235.  
  18236.  U1186                             error writing to new library
  18237.  
  18238.                                    The disk or root directory was full.
  18239.  
  18240.                                    Delete or move files to make space.
  18241.  
  18242.  U1187                             cannot open VM.TMP
  18243.  
  18244.                                    The disk or root directory was full.
  18245.  
  18246.                                    Delete or move files to make space.
  18247.  
  18248.  Number                            Fatal Error Message
  18249.  ────────────────────────────────────────────────────────────────────────────
  18250.  U1188                             cannot write to VM
  18251.  
  18252.                                    Note the circumstances of the failure
  18253.                                    and notify Microsoft Corporation by
  18254.                                    using the Microsoft Product Assistance
  18255.                                    Request form at the back of C for
  18256.                                    Yourself, included in the QuickC version
  18257.                                    2.5 package.
  18258.  
  18259.  U1189                             cannot read from VM
  18260.  
  18261.                                    Note the circumstances of the failure
  18262.                                    and notify Microsoft Corporation by
  18263.                                    using the Microsoft Product Assistance
  18264.                                    Request form at the back of C for
  18265.                                    Yourself, included in the QuickC version
  18266.                                    2.5 package.
  18267.  
  18268.  U1200                             'name' : invalid library header
  18269.  
  18270.                                    The input library file had an invalid
  18271.                                    format. It was either not a library file,
  18272.                                    or it had been corrupted.
  18273.  
  18274.  U1203                             'name' : invalid object module near '
  18275.                                    location'
  18276.  
  18277.                                    The module specified by name was not a
  18278.                                    valid object module.
  18279.  
  18280.  U2152                             'filename' : cannot create listing
  18281.  
  18282.                                    The directory or disk was full, or the
  18283.                                    cross-reference listing file already
  18284.                                    existed with read-only protection.
  18285.  
  18286.                                    Make space on the disk or change the
  18287.                                    protection of the cross-reference
  18288.                                    listing file.
  18289.  
  18290.  U2155                             'modulename' : module not in library;
  18291.                                    ignored
  18292.  
  18293.                                    The specified module was not found in
  18294.                                    the input library.
  18295.  
  18296.  U2157                             'filename' : cannot access file
  18297.  
  18298.                                    LIB was unable to open the specified
  18299.                                    file.
  18300.  
  18301.  U2158                             'libraryname' : invalid library header;
  18302.                                    file ignored
  18303.  
  18304.                                    The input library had an incorrect
  18305.                                    format.
  18306.  
  18307.  U2159                             'filename' : invalid format 'hexnumber';
  18308.                                    file ignored
  18309.  
  18310.                                    The signature byte or word hexnumber of
  18311.                                    the given file was not one of the
  18312.                                    following recognized types: Microsoft
  18313.                                    library, Intel library, Microsoft object,
  18314.                                    or XENIX archive.
  18315.  
  18316.  
  18317.  D.5.2  LIB Warning Messages
  18318.  
  18319.  Number                            Warning Message
  18320.  ────────────────────────────────────────────────────────────────────────────
  18321.  U4150                             'modulename' : module redefinition
  18322.                                    ignored
  18323.  
  18324.                                    A module was specified to be added to a
  18325.                                    library, but a module with the same name
  18326.                                    was already in the library, or a module
  18327.                                    with the same name was found more than
  18328.                                    once in the library.
  18329.  
  18330.  U4151                             'name' : symbol defined in module name,
  18331.                                    redefinition ignored
  18332.  
  18333.                                    The specified symbol was defined in more
  18334.                                    than one module.
  18335.  
  18336.  U4153                             number1 : number2 : page size too small;
  18337.                                    ignored
  18338.  
  18339.                                    The value specified in the /PAGESIZE
  18340.                                    option was less than 16.
  18341.  
  18342.  U4155                             'modulename' : module not in library
  18343.  
  18344.                                    A module specified to be replaced does
  18345.                                    not already exist in the library. LIB
  18346.                                    adds the module anyway.
  18347.  
  18348.  U4156                             output-library specification ignored
  18349.  
  18350.                                    An output library was specified in
  18351.                                    addition to a new library name. For
  18352.                                    example, specifying
  18353.  
  18354.                                    LIB new.lib+one.obj,new.lst,new.lib
  18355.  
  18356.                                    where  new.lib  does not already exist
  18357.                                    causes this error.
  18358.  
  18359.  U4157                             insufficient memory, extended dictionary
  18360.                                    not created
  18361.  
  18362.                                    Insufficient memory prevented LIB from
  18363.                                    creating an extended dictionary. The
  18364.                                    library is still valid, but the linker
  18365.                                    will not be able to take advantage of
  18366.                                    the extended dictionary to speed linking.
  18367.  
  18368.  U4158                             internal error, extended dictionary not
  18369.                                    created
  18370.  
  18371.                                    An internal error prevented LIB from
  18372.                                    creating an extended dictionary. The
  18373.                                    library is still valid, but the linker
  18374.                                    will not be able to take advantage of
  18375.                                    the extended dictionary to speed linking.
  18376.  
  18377.  
  18378.  D.6  NMAKE Error Messages
  18379.  
  18380.  Error messages from the NMAKE utility have one of the following formats:
  18381.  
  18382.    {filename |  NMAKE} :  fatal error U1xxx: messagetext
  18383.    {filename |  NMAKE} :  warning U4xxx: messagetext
  18384.  
  18385.  The message begins with the input-file name (filename) and line number, if
  18386.  one exists, or with the name of the utility.
  18387.  
  18388.  NMAKE generates the following error messages.
  18389.  
  18390.  
  18391.  D.6.1  Fatal Error Messages
  18392.  
  18393.  Number                            Fatal<|>Error<|>Message
  18394.  ────────────────────────────────────────────────────────────────────────────
  18395.  U1000                             syntax error: ')' missing in macro
  18396.                                    invocation
  18397.  
  18398.                                    A left parenthesis (( ) appeared without
  18399.                                    a matching right parenthesis ( )) in a
  18400.                                    macro invocation. The correct form is $(
  18401.                                    name), or $n for one-character names.
  18402.  
  18403.  U1001                             syntax error: illegal character '
  18404.                                    character' in macro
  18405.  
  18406.                                    A nonalphanumeric character other than
  18407.                                    an underscore (_) appeared in a macro.
  18408.  
  18409.  U1002                             syntax error: invalid macro invocation
  18410.                                    '$'
  18411.  
  18412.                                    A single dollar sign ($) appeared
  18413.                                    without a macro name associated with it.
  18414.  
  18415.                                    The correct form is $(name). To use a
  18416.                                    dollar sign in the file, type it twice (
  18417.                                    $$) or precede it with a caret (^).
  18418.  
  18419.  U1003                             syntax error: '=' missing in macro
  18420.  
  18421.                                    The equal sign (=) was missing in a
  18422.                                    macro definition.
  18423.  
  18424.                                    The correct form is
  18425.  
  18426.                                    name = value
  18427.  
  18428.  U1004                             syntax error: macro name missing
  18429.  
  18430.                                    A macro invocation appeared without a
  18431.                                    name.
  18432.  
  18433.                                    The correct form is
  18434.  
  18435.                                    $(name)
  18436.  
  18437.  Number                            Fatal Error Message
  18438.  ────────────────────────────────────────────────────────────────────────────
  18439.  U1005                             syntax error: text must follow ':' in
  18440.                                    macro
  18441.  
  18442.                                    A string substitution was specified for
  18443.                                    a macro, but the string to be changed in
  18444.                                    the macro was not specified.
  18445.  
  18446.  U1006                             syntax: missing closing double quotation
  18447.                                    mark
  18448.  
  18449.                                    An opening double quotation mark (")
  18450.                                    appeared without a closing double
  18451.                                    quotation mark.
  18452.  
  18453.  U1007                             double quotation mark not allowed in
  18454.                                    name
  18455.  
  18456.                                    The specified target name or file name
  18457.                                    contained a double quotation mark (").
  18458.  
  18459.                                    Double quotation marks can surround a
  18460.                                    file name but not be contained within it.
  18461.  
  18462.  U1017                             unknown directive '!directive'
  18463.  
  18464.                                    The directive specified is not one of
  18465.                                    the recognized directives.
  18466.  
  18467.  U1018                             directive and/or expression part missing
  18468.  
  18469.                                    The directive was incompletely specified.
  18470.  
  18471.                                    The expression part is required.
  18472.  
  18473.  U1019                             too many nested if blocks
  18474.  
  18475.                                    Note the circumstances of the error and
  18476.                                    notify Microsoft Corporation by
  18477.                                    following the instructions in the
  18478.                                    Microsoft Product Assistance Request
  18479.                                    form at the back of C for Yourself,
  18480.                                    included in the QuickC version 2.5
  18481.                                    package.
  18482.  
  18483.  U1020                             end-of-file found before next directive
  18484.  
  18485.                                    A directive, such as !ENDIF, was missing.
  18486.  
  18487.  U1021                             syntax error: else unexpected
  18488.  
  18489.                                    An !ELSE directive was found that was
  18490.                                    not preceded by !IF, !IFDEF, or !IFNDEF,
  18491.                                    or the directive was placed in a
  18492.                                    syntactically incorrect place.
  18493.  
  18494.  U1022                             missing terminating character for
  18495.                                    string/program invocation : 'char'
  18496.  
  18497.                                    The closing double quotation mark (") in
  18498.                                    a string comparison in a directive was
  18499.                                    missing, or the closing bracket ( ] ) in
  18500.                                    a program invocation in a directive was
  18501.                                    missing.
  18502.  
  18503.  U1023                             syntax error present in expression
  18504.  
  18505.                                    An expression is invalid.
  18506.  
  18507.                                    Check the allowed operators and operator
  18508.                                    precedence.
  18509.  
  18510.  Number                            Fatal Error Message
  18511.  ────────────────────────────────────────────────────────────────────────────
  18512.  U1024                             illegal argument to !CMDSWITCHES
  18513.  
  18514.                                    An unrecognized command switch was
  18515.                                    specified.
  18516.  
  18517.  U1031                             file name missing (or macro is null)
  18518.  
  18519.                                    An include directive was found, but the
  18520.                                    name of the file to be included was
  18521.                                    missing, or the macro expanded to
  18522.                                    nothing.
  18523.  
  18524.  U1033                             syntax error: 'string' unexpected
  18525.  
  18526.                                    The specified string is not part of the
  18527.                                    valid syntax for a makefile.
  18528.  
  18529.  U1034                             syntax error: separator missing
  18530.  
  18531.                                    The colon (:) that separates target(s)
  18532.                                    and dependent(s) is missing.
  18533.  
  18534.  U1035                             syntax error: expected ':' or '='
  18535.                                    separator
  18536.  
  18537.                                    Either a colon (:), implying a
  18538.                                    dependency line, or an equal sign (=),
  18539.                                    implying a macro definition, was
  18540.                                    expected.
  18541.  
  18542.  U1036                             syntax error: too many names to left of
  18543.                                    '='
  18544.  
  18545.                                    Only one string is allowed to the left
  18546.                                    of a macro definition.
  18547.  
  18548.  U1037                             syntax error: target name missing
  18549.  
  18550.                                    A colon (:) was found before a target
  18551.                                    name was found.
  18552.  
  18553.                                    At least one target is required.
  18554.  
  18555.  U1038                             internal error: lexer
  18556.  
  18557.                                    Note the circumstances of the error and
  18558.                                    notify Microsoft Corporation by
  18559.                                    following the instructions in the
  18560.                                    Microsoft Product Assistance Request
  18561.                                    form at the back of C for Yourself,
  18562.                                    included in the QuickC version 2.5
  18563.                                    package.
  18564.  
  18565.  U1039                             internal error: parser
  18566.  
  18567.                                    Note the circumstances of the error and
  18568.                                    notify Microsoft Corporation by
  18569.                                    following the instructions in the
  18570.                                    Microsoft Product Assistance Request
  18571.                                    form at the back of C for Yourself,
  18572.                                    included in the QuickC version 2.5
  18573.                                    package.
  18574.  
  18575.  U1040                             internal error: macro expansion
  18576.  
  18577.                                    Note the circumstances of the error and
  18578.                                    notify Microsoft Corporation by
  18579.                                    following the instructions in the
  18580.                                    Microsoft Product Assistance Request
  18581.                                    form at the back of C for Yourself,
  18582.                                    included in the QuickC version 2.5
  18583.                                    package.
  18584.  
  18585.  Number                            Fatal Error Message
  18586.  ────────────────────────────────────────────────────────────────────────────
  18587.  U1041                             internal error: target building
  18588.  
  18589.                                    Note the circumstances of the error and
  18590.                                    notify Microsoft Corporation by
  18591.                                    following the instructions in the
  18592.                                    Microsoft Product Assistance Request
  18593.                                    form at the back of C for Yourself,
  18594.                                    included in the QuickC version 2.5
  18595.                                    package.
  18596.  
  18597.  U1042                             internal error: expression stack
  18598.                                    overflow
  18599.  
  18600.                                    Note the circumstances of the error and
  18601.                                    notify Microsoft Corporation by
  18602.                                    following the instructions in the
  18603.                                    Microsoft Product Assistance Request
  18604.                                    form at the back of C for Yourself,
  18605.                                    included in the QuickC version 2.5
  18606.                                    package.
  18607.  
  18608.  U1043                             internal error : temp file limit
  18609.                                    exceeded
  18610.  
  18611.                                    Note the circumstances of the error and
  18612.                                    notify Microsoft Corporation by
  18613.                                    following the instructions in the
  18614.                                    Microsoft Product Assistance Request
  18615.                                    form at the back of C for Yourself,
  18616.                                    included in the QuickC version 2.5
  18617.                                    package.
  18618.  
  18619.  U1044                             internal error : too many levels of
  18620.                                    recursion building a target
  18621.  
  18622.                                    Note the circumstances of the error and
  18623.                                    notify Microsoft Corporation by
  18624.                                    following the instructions in the
  18625.                                    Microsoft Product Assistance Request
  18626.                                    form at the back of C for Yourself,
  18627.                                    included in the QuickC version 2.5
  18628.                                    package.
  18629.  
  18630.  U1045                             'internal error message'
  18631.  
  18632.                                    Note the circumstances of the error and
  18633.                                    notify Microsoft Corporation by
  18634.                                    following the instructions in the
  18635.                                    Microsoft Product Assistance Request
  18636.                                    form at the back of C for Yourself,
  18637.                                    included in the QuickC version 2.5
  18638.                                    package.
  18639.  
  18640.  U1050                             'user-specified text'
  18641.  
  18642.                                    The message specified with the !ERROR
  18643.                                    directive is displayed.
  18644.  
  18645.  U1051                             out of memory
  18646.  
  18647.                                    The program ran out of space in the far
  18648.                                    heap.
  18649.  
  18650.                                    Split the description file into smaller
  18651.                                    and simpler pieces.
  18652.  
  18653.  U1052                             file 'filename' not found
  18654.  
  18655.                                    The file was not found.
  18656.  
  18657.                                    The file name may not be properly
  18658.                                    specified in the makefile.
  18659.  
  18660.  Number                            Fatal Error Message
  18661.  ────────────────────────────────────────────────────────────────────────────
  18662.  U1053                             file 'filename' unreadable
  18663.  
  18664.                                    The file cannot be read.
  18665.  
  18666.                                    The following are possible causes of
  18667.                                    this error:
  18668.  
  18669.                                    ■ The file does not have appropriate
  18670.                                    attributes for reading.
  18671.  
  18672.                                    ■ A bad area exists on disk.
  18673.  
  18674.                                    ■ A bad file-allocation table exists.
  18675.  
  18676.                                    ■ The file is locked.
  18677.  
  18678.  U1054                             cannot create in-line file 'filename'
  18679.  
  18680.                                    NMAKE failed in its attempt to create
  18681.                                    the file given by name.
  18682.  
  18683.                                    The following are possible causes of
  18684.                                    this error:
  18685.  
  18686.                                    ■ The file already exists with a
  18687.                                    read-only attribute.
  18688.  
  18689.                                    ■ There is insufficient disk space to
  18690.                                    create the file.
  18691.  
  18692.  U1055                             out of environment space
  18693.  
  18694.                                    The environment space limit was reached.
  18695.  
  18696.                                    Restart the program with a larger
  18697.                                    environment space or with fewer
  18698.                                    environment variables.
  18699.  
  18700.  U1056                             cannot find command processor
  18701.  
  18702.                                    The command processor was not found.
  18703.  
  18704.                                    NMAKE uses COMMAND.COM or CMD.EXE as a
  18705.                                    command processor to execute commands.
  18706.                                    It looks for the command processor first
  18707.                                    by the full path name given by the
  18708.                                    COMSPEC environment variable. If COMSPEC
  18709.                                    does not exist, NMAKE searches the
  18710.                                    directories specified by the PATH
  18711.                                    environment variable.
  18712.  
  18713.  U1057                             cannot delete temporary file 'filename'
  18714.  
  18715.                                    NMAKE failed to delete the temporary
  18716.                                    in-line file.
  18717.  
  18718.  U1058                             terminated by user
  18719.  
  18720.                                    Execution of NMAKE was aborted by CTRL+C
  18721.                                    or CTRL+BREAK.
  18722.  
  18723.  Number                            Fatal Error Message
  18724.  ────────────────────────────────────────────────────────────────────────────
  18725.  U1060                             unable to close file : 'filename'
  18726.  
  18727.                                    NMAKE encountered an error while closing
  18728.                                    a file.
  18729.  
  18730.                                    One of the following may have occurred:
  18731.  
  18732.                                    ■ The file is a read-only file.
  18733.  
  18734.                                    ■ There is a locking or sharing
  18735.                                    violation.
  18736.  
  18737.                                    ■ The disk is full.
  18738.  
  18739.  U1061                             /F option requires a file name
  18740.  
  18741.                                    The /F command-line option requires the
  18742.                                    name of the description file to be
  18743.                                    specified.
  18744.  
  18745.                                    To use standard input, specify '-' as
  18746.                                    the description file name.
  18747.  
  18748.  U1062                             missing file name with /X option
  18749.  
  18750.                                    The /X command-line option requires the
  18751.                                    name of the file to which diagnostic
  18752.                                    error output should be redirected.
  18753.  
  18754.                                    To use standard input, specify '-' as
  18755.                                    the output file name.
  18756.  
  18757.  U1063                             missing macro name before '='
  18758.  
  18759.                                    NMAKE detected an equal sign (=) without
  18760.                                    a preceding name.
  18761.  
  18762.                                    This error can occur in a recursive call
  18763.                                    when the macro corresponding to the
  18764.                                    macro name expands to nothing.
  18765.  
  18766.  U1064                             MAKEFILE not found and no target
  18767.                                    specified
  18768.  
  18769.                                    No description file was found, and no
  18770.                                    target was specified.
  18771.  
  18772.                                    A description file can be specified
  18773.                                    either with the /F option or through the
  18774.                                    default file MAKEFILE. Note that NMAKE
  18775.                                    can create a target using an inference
  18776.                                    rule even if no description file is
  18777.                                    specified.
  18778.  
  18779.  U1065                             invalid option 'option'
  18780.  
  18781.                                    The option specified is not a valid
  18782.                                    option for NMAKE.
  18783.  
  18784.  U1066                             option '/N' not supported; use NMAKE
  18785.  
  18786.                                    NMAKE's shell program NMK.COM does not
  18787.                                    support the /N option.
  18788.  
  18789.                                    Use NMAKE /N.
  18790.  
  18791.  Number                            Fatal Error Message
  18792.  ────────────────────────────────────────────────────────────────────────────
  18793.  U1070                             cycle in macro definition 'macroname'
  18794.  
  18795.                                    A circular definition was detected in
  18796.                                    the macro definition specified.
  18797.  
  18798.                                    Circular definitions are invalid.
  18799.  
  18800.  U1071                             cycle in dependency tree for target '
  18801.                                    targetname'
  18802.  
  18803.                                    A circular dependency was detected in
  18804.                                    the dependency tree for the specified
  18805.                                    target.
  18806.  
  18807.                                    Circular dependencies are invalid.
  18808.  
  18809.  U1072                             cycle in include files : 'filename'
  18810.  
  18811.                                    A circular inclusion was detected in the
  18812.                                    include file specified. The named file
  18813.                                    includes a file which eventually
  18814.                                    includes the named file.
  18815.  
  18816.  U1073                             don't know how to make 'targetname'
  18817.  
  18818.                                    The specified target does not exist, and
  18819.                                    there are no commands to execute or
  18820.                                    inference rules given for it.
  18821.  
  18822.  U1074                             macro definition too long
  18823.  
  18824.                                    The value of a macro definition would
  18825.                                    overflow an internal buffer.
  18826.  
  18827.  U1075                             string too long
  18828.  
  18829.                                    The text string would overflow an
  18830.                                    internal buffer.
  18831.  
  18832.  U1076                             name too long
  18833.  
  18834.                                    The macro name, target name, or
  18835.                                    build-command name would overflow an
  18836.                                    internal buffer.
  18837.  
  18838.                                    Macro names may not exceed 128
  18839.                                    characters.
  18840.  
  18841.  U1077                             'program' : return code 'value'
  18842.  
  18843.                                    The given program invoked from NMAKE
  18844.                                    failed, returning the error code value.
  18845.  
  18846.  U1078                             constant overflow at 'directive'
  18847.  
  18848.                                    A constant in the directive's expression
  18849.                                    was too big.
  18850.  
  18851.  U1079                             illegal expression : divide by zero
  18852.                                    present
  18853.  
  18854.                                    An expression tried to divide by zero.
  18855.  
  18856.  Number                            Fatal Error Message
  18857.  ────────────────────────────────────────────────────────────────────────────
  18858.  U1080                             operator and/or operand out of place :
  18859.                                    usage illegal
  18860.  
  18861.                                    The expression incorrectly used an
  18862.                                    operator or operand.
  18863.  
  18864.                                    Check the allowed set of operators and
  18865.                                    their order of precedence.
  18866.  
  18867.  U1081                             'program' : program not found
  18868.  
  18869.                                    NMAKE could not find the given program
  18870.                                    in order to run it.
  18871.  
  18872.                                    Make sure that the program is in the
  18873.                                    current path and has the correct
  18874.                                    extension.
  18875.  
  18876.  U1082                             'command' : cannot execute command : out
  18877.                                    of memory
  18878.  
  18879.                                    NMAKE cannot execute the given command
  18880.                                    because there is not enough memory.
  18881.  
  18882.                                    Free memory and run NMAKE again.
  18883.  
  18884.  U1083                             target macro '$(macroname)' expands to
  18885.                                    nothing
  18886.  
  18887.                                    A target was specified as a macro name
  18888.                                    that has not been defined or has null
  18889.                                    value.
  18890.  
  18891.                                    NMAKE cannot process a null target.
  18892.  
  18893.  U1084                             in-line file not allowed in inference
  18894.                                    rules
  18895.  
  18896.                                    In-line file syntax is not allowed in
  18897.                                    inference rules and can be used only in
  18898.                                    a target-dependency block.
  18899.  
  18900.  U1085                             cannot mix implicit and explicit rules
  18901.  
  18902.                                    A regular target was specified along
  18903.                                    with the target for a rule.
  18904.  
  18905.                                    A rule has the form
  18906.  
  18907.                                    .fromext.toext
  18908.  
  18909.  U1086                             inference rule cannot have dependents
  18910.  
  18911.                                    Dependents are not allowed when an
  18912.                                    inference rule is being defined.
  18913.  
  18914.  U1087                             cannot have : and :: dependents for same
  18915.                                    target
  18916.  
  18917.                                    A target cannot have both a single-colon
  18918.                                    (:) and a double-colon (::) dependency.
  18919.  
  18920.  U1088                             invalid separator '::' on inference rule
  18921.  
  18922.                                    Inference rules can use only a
  18923.                                    single-colon (:) separator.
  18924.  
  18925.  Number                            Fatal Error Message
  18926.  ────────────────────────────────────────────────────────────────────────────
  18927.  U1089                             cannot have build commands for
  18928.                                    pseudotarget 'targetname'
  18929.  
  18930.                                    Pseudotargets (for example, .PRECIOUS or
  18931.                                    .SUFFIXES) cannot have build commands
  18932.                                    specified.
  18933.  
  18934.  U1090                             cannot have dependents for pseudotarget
  18935.                                    'targetname'
  18936.  
  18937.                                    The specified pseudotarget (for example,
  18938.                                    .SILENT or .IGNORE) cannot have a
  18939.                                    dependent.
  18940.  
  18941.  U1091                             invalid suffixes in inference rule
  18942.  
  18943.                                    The suffixes being used in the inference
  18944.                                    rule are not part of the .SUFFIXES list.
  18945.  
  18946.  U1092                             too many names in rule
  18947.  
  18948.                                    An inference rule cannot have more than
  18949.                                    one pair of extensions as a target.
  18950.  
  18951.  U1093                             cannot mix special pseudotargets
  18952.  
  18953.                                    It is illegal to list two or more
  18954.                                    pseudotargets together.
  18955.  
  18956.  U1094                             syntax error : only (no)keep allowed
  18957.                                    here
  18958.  
  18959.                                    Something other than KEEP or NOKEEP
  18960.                                    appeared at the end of the syntax for
  18961.                                    creating an in-line file.
  18962.  
  18963.                                    The syntax for generating an in-line
  18964.                                    file allows an action to be specified
  18965.                                    after the second pair of angle brackets.
  18966.                                    Valid actions are KEEP and NOKEEP. Other
  18967.                                    actions are errors.
  18968.  
  18969.                                    The KEEP option specifies that NMAKE
  18970.                                    should leave the in-line file on disk.
  18971.                                    The NOKEEP option causes NMAKE to delete
  18972.                                    the file before exiting. The default is
  18973.                                    NOKEEP.
  18974.  
  18975.  U1095                             expanded command line 'commandline' too
  18976.                                    long
  18977.  
  18978.                                    After macro expansion, the command line
  18979.                                    exceeded the length limit of 128
  18980.                                    characters.
  18981.  
  18982.                                    If the command is a QLINK command line,
  18983.                                    use a response file.
  18984.  
  18985.  U1096                             cannot open file 'filename'
  18986.  
  18987.                                    The given file could not be opened,
  18988.                                    either because the disk was full or
  18989.                                    because the file has been set to be
  18990.                                    read-only.
  18991.  
  18992.  Number                            Fatal Error Message
  18993.  ────────────────────────────────────────────────────────────────────────────
  18994.  U1097                             extmake syntax usage error, no dependent
  18995.  
  18996.                                    No dependent was given.
  18997.  
  18998.                                    In extmake syntax, the target under
  18999.                                    consideration must have either an
  19000.                                    implicit dependent or an explicit
  19001.                                    dependent.
  19002.  
  19003.  U1098                             extmake syntax in 'string' incorrect
  19004.  
  19005.                                    The part of the string shown contains an
  19006.                                    extmake syntax error.
  19007.  
  19008.  
  19009.  D.6.2  Compilation Error Message
  19010.  
  19011.  Number                            Compilation Error Message
  19012.  ────────────────────────────────────────────────────────────────────────────
  19013.  U2001                             no more file handles (too many files
  19014.                                    open)
  19015.  
  19016.                                    NMAKE could not find a free file handle.
  19017.  
  19018.                                    One of the following may be a solution:
  19019.  
  19020.                                    ■ Reduce recursion in the build
  19021.                                    procedures.
  19022.  
  19023.                                    ■ Increase the number of file handles by
  19024.                                    changing the FILES setting in CONFIG.SYS
  19025.                                    to allow a larger number of open files.
  19026.                                    FILES = 20 is the recommended setting.
  19027.  
  19028.  
  19029.  D.6.3  Warning Messages
  19030.  
  19031.  Number                            Warning Message
  19032.  ────────────────────────────────────────────────────────────────────────────
  19033.  U4001                             command file can be invoked only from
  19034.                                    command line
  19035.  
  19036.                                    A command file cannot be invoked from
  19037.                                    within another command file. Such an
  19038.                                    invocation is ignored.
  19039.  
  19040.                                    The command file should contain the
  19041.                                    entire remaining command line.
  19042.  
  19043.  U4002                             resetting value of special macro '
  19044.                                    macroname'
  19045.  
  19046.                                    The value of a macro such as $(MAKE) was
  19047.                                    changed within a description file.
  19048.  
  19049.                                    The name by which this program was
  19050.                                    invoked is not a tagged section in the
  19051.                                    TOOLS.INI file.
  19052.  
  19053.  U4003                             no match found for wild card 'filename'
  19054.  
  19055.                                    There are no file names that match the
  19056.                                    specified target or dependent file with
  19057.                                    the wild-card characters asterisk (*)
  19058.                                    and question mark (?).
  19059.  
  19060.  Number                            Warning Message
  19061.  ────────────────────────────────────────────────────────────────────────────
  19062.  U4004                             too many rules for target 'targetname'
  19063.  
  19064.                                    Multiple blocks of build commands were
  19065.                                    specified for a target using single
  19066.                                    colons (:) as separators.
  19067.  
  19068.  U4005                             ignoring rule 'rule' (extension not in
  19069.                                    .SUFFIXES)
  19070.  
  19071.                                    The rule was ignored because the
  19072.                                    suffix(es) in the rule are not listed in
  19073.                                    the .SUFFIXES list.
  19074.  
  19075.  U4006                             special macro undefined : 'macroname'
  19076.  
  19077.                                    The special macro name is undefined and
  19078.                                    expands to nothing.
  19079.  
  19080.  U4007                             file name 'filename' too long;
  19081.                                    truncating to 8.3
  19082.  
  19083.                                    The base name of the file has more than
  19084.                                    eight characters, or the extension has
  19085.                                    more than three characters. NMAKE
  19086.                                    truncates the name to an eight-character
  19087.                                    base and a three-character extension.
  19088.  
  19089.  U4008                             removed target 'target'
  19090.  
  19091.                                    Execution of NMAKE was interrupted while
  19092.                                    NMAKE was trying to build the given
  19093.                                    target; therefore the target was
  19094.                                    incomplete. Because the target was not
  19095.                                    specified in the .PRECIOUS list, NMAKE
  19096.                                    has deleted it.
  19097.  
  19098.  U4009                             duplicate in-line file 'filename'
  19099.  
  19100.                                    The given file name is the same as the
  19101.                                    name of an earlier in-line file.
  19102.  
  19103.                                    Reusing this name caused the earlier
  19104.                                    file to be overwritten. This will
  19105.                                    probably cause unexpected results.
  19106.  
  19107.  
  19108.  
  19109.  
  19110.  
  19111.  
  19112.  
  19113.  Glossary
  19114.  ────────────────────────────────────────────────────────────────────────────
  19115.  
  19116.  The definitions in this glossary are intended primarily for use with this
  19117.  manual. Neither individual definitions nor the list of terms is
  19118.  comprehensive.
  19119.  
  19120.  8087 or 80287 coprocessor
  19121.  See "math coprocessor."
  19122.  
  19123.  ANSI (American National Standards Institute)
  19124.  The national institute responsible for defining programming-language
  19125.  standards to promote portability of these languages between different
  19126.  computer systems.
  19127.  
  19128.  argument
  19129.  A value passed to a function. In the QuickC Compiler Tool Kit, a string or
  19130.  value that modifies the effects of a compiler, linker, or utility option.
  19131.  
  19132.  arithmetic conversion
  19133.  Conversion operations performed on items of integral and floating-point
  19134.  types used in expressions.
  19135.  
  19136.  ASCII (American Standard Code for Information Interchange)
  19137.  A set of 256 codes that many computers use to represent letters, digits,
  19138.  special characters, and other symbols. Only the first 128 of these codes are
  19139.  standardized; the remaining 128 are special characters that are defined by
  19140.  the computer manufacturer.
  19141.  
  19142.  base name
  19143.  The portion of the file name that precedes the file-name extension. For
  19144.  example,  samp  is the base name of the file  samp.c.
  19145.  
  19146.  batch file
  19147.  A text file containing DOS commands that can be invoked from the DOS com-
  19148.  mand line.
  19149.  
  19150.  block
  19151.  A sequence of declarations, definitions, and statements enclosed within
  19152.  braces ({ }).
  19153.  
  19154.  canonical frame number
  19155.  Part of the starting address for a segment. The canonical frame number
  19156.  specifies the address of the first paragraph in memory that contains one or
  19157.  more bytes of the segment.
  19158.  
  19159.  child process
  19160.  A new process started by a currently running process.
  19161.  
  19162.  compact memory model
  19163.  A memory model that allows for more than one data segment and only one code
  19164.  segment.
  19165.  
  19166.  constant expression
  19167.  Any expression that evaluates to a constant. A constant may involve integer
  19168.  constants, character constants, floating-point constants, enumeration
  19169.  constants, type casts to integral and floating-point types, and other
  19170.  constant expressions.
  19171.  
  19172.  coprocessor
  19173.  See "math coprocessor."
  19174.  
  19175.  declaration
  19176.  A construct that associates the name and the attributes of a variable,
  19177.  function, or type.
  19178.  
  19179.  definition
  19180.  A construct that initializes and allocates storage for a variable or that
  19181.  specifies the name, formal parameters, body, and the return type of a
  19182.  function.
  19183.  
  19184.  dependency line
  19185.  A line in an NMAKE description file that defines one or more targets and the
  19186.  files they depend on.
  19187.  
  19188.  dependents
  19189.  The files that, when modified, cause NMAKE to update a target.
  19190.  
  19191.  description block
  19192.  A dependency line in an NMAKE description file and all the statements
  19193.  (commands, comments, and directives) that apply to it.
  19194.  
  19195.  description file
  19196.  The text file that NMAKE reads to determine what to do. A description file
  19197.  is sometimes called a makefile.
  19198.  
  19199.  directive
  19200.  An instruction to the C preprocessor to perform a specific action on
  19201.  source-program text before compilation. For the NMAKE utility, an
  19202.  instruction that gives information about which commands to execute or how to
  19203.  execute them.
  19204.  
  19205.  emulator
  19206.  A floating-point-math package that provides software emulation of the
  19207.  operations of a math coprocessor.
  19208.  
  19209.  environment variable
  19210.  A variable stored in the environment table that provides DOS with
  19211.  information (where to find executable files and library files, where to
  19212.  create temporary files, etc.).
  19213.  
  19214.  errorlevel code
  19215.  See "exit code."
  19216.  
  19217.  escape character
  19218.  A character that, when used immediately preceding a special character,
  19219.  causes the special character to lose its special meaning.
  19220.  
  19221.  executable image
  19222.  The code and data that make up an executable file; that is, a compiled,
  19223.  linked program that DOS can execute.
  19224.  
  19225.  exit code
  19226.  A code returned by a program to DOS indicating whether the program ran
  19227.  successfully.
  19228.  
  19229.  expression
  19230.  A combination of operands and operators that yields a single value.
  19231.  
  19232.  external level
  19233.  The parts of a C program outside the function declarations.
  19234.  
  19235.  formal parameters
  19236.  Variables that receive values passed to a function when the function is
  19237.  called.
  19238.  
  19239.  function
  19240.  A collection of declarations and statements that has a unique name and can
  19241.  return a value.
  19242.  
  19243.  function body
  19244.  A statement block containing the local variable declarations and statements
  19245.  of a function.
  19246.  
  19247.  function call
  19248.  An expression that passes control and arguments (if any) to a function.
  19249.  
  19250.  function declaration
  19251.  A declaration that establishes the name, return type, and storage class of a
  19252.  function that is defined explicitly elsewhere in the program.
  19253.  
  19254.  function definition
  19255.  A definition that specifies a function's name, its formal parameters, the
  19256.  declarations and statements that define what it does, and (optionally) its
  19257.  return type and storage class.
  19258.  
  19259.  function prototype
  19260.  A function declaration that includes a list of the names and types of formal
  19261.  parameters in the parentheses following the function name.
  19262.  
  19263.  global region
  19264.  The area of a source file between the beginning of the file and the first
  19265.  curly brace of a function, or between the ending curly brace of a function
  19266.  and the beginning curly brace of another function. If no edits have occurred
  19267.  within a global region, incremental compilation is usually possible.
  19268.  
  19269.  heap
  19270.  An area of memory set aside for dynamic allocation by a program.
  19271.  
  19272.  huge memory model
  19273.  A memory model that allows for more than one code segment. Individual data
  19274.  items may exceed 64K in length.
  19275.  
  19276.  include file
  19277.  A text file that is merged into another text file through use of the
  19278.  #include preprocessor directive.
  19279.  
  19280.  incremental compilation
  19281.  The compilation mode, specified by the /Gi option to the QCL command, in
  19282.  which only changed functions are recompiled.
  19283.  
  19284.  incremental linking
  19285.  The process of linking with ILINK instead of QLINK, in which only changed
  19286.  modules are relinked. This process requires that the /INC option to the
  19287.  QLINK command be specified first. The actual use of ILINK is then specified
  19288.  by the /Gi and /Li options to the QCL command.
  19289.  
  19290.  inference rule
  19291.  A template that the NMAKE utility follows to update a target in the absence
  19292.  of explicit commands.
  19293.  
  19294.  internal level
  19295.  The parts of a C program within function declarations.
  19296.  
  19297.  keyword
  19298.  A word with a special, predefined meaning for the QuickC compiler.
  19299.  
  19300.  large memory model
  19301.  A memory model that allows for more than one segment of code and more than
  19302.  one segment of data, but with no individual data items exceeding 64K.
  19303.  
  19304.  level
  19305.  See "internal level"; "external level."
  19306.  
  19307.  library
  19308.  A file containing compiled modules. Also called an object-code library. The
  19309.  linker extracts modules from the library and combines them with object files
  19310.  to create executable program files. A load library is a library specified in
  19311.  the object-files field as input to the linker. The linker links every module
  19312.  in a load library into the executable file.
  19313.  
  19314.  load-time-relocation table
  19315.  A table of references, relative to the start of the program, that are
  19316.  resolved when the program is loaded into memory.
  19317.  
  19318.  loop optimization
  19319.  Optimization that reduces the amount of code executed for each loop
  19320.  iteration in a program, thereby increasing the speed with which the loop
  19321.  executes.
  19322.  
  19323.  lvalue
  19324.  An expression (such as a variable name) that refers to a memory location and
  19325.  is required as the left-hand operand of an assignment operation or as the
  19326.  single operand of a unary operator.
  19327.  
  19328.  macro
  19329.  An identifier defined in a #define preprocessor directive to represent
  19330.  another series of tokens. For the NMAKE utility, a name defined on the
  19331.  command line or in a description file to represent another string.
  19332.  
  19333.  math coprocessor
  19334.  Hardware products that provide very fast and very precise floating-point
  19335.  number processing. Examples include the Intel 8087 and 80287 coprocessors.
  19336.  
  19337.  medium memory model
  19338.  A memory model that allows for more than one code segment and only one data
  19339.  segment.
  19340.  
  19341.  member
  19342.  One of the elements of a structure or union.
  19343.  
  19344.  memory model
  19345.  One of the models that specifies how memory is set up for program code and
  19346.  data. (For descriptions of standard memory models, see "tiny memory model";
  19347.  "small memory model"; "medium memory model"; "compact memory model"; "large
  19348.  memory model"; "huge memory model.")
  19349.  
  19350.  module-description table (MDT)
  19351.  A file created or updated during incremental compilation that saves
  19352.  information about changes to a source file.
  19353.  
  19354.  NAN (not a number)
  19355.  The 8087 or 80287 coprocessor generates NANs when the result of an operation
  19356.  cannot be represented in the IEEE format. For example, if you try to add two
  19357.  positive numbers whose sum is larger than the maximum value permitted by the
  19358.  processor, the coprocessor returns a NAN instead of the sum.
  19359.  
  19360.  newline character
  19361.  The character used to mark the end of a line in a text file, or the escape
  19362.  sequence (\n) used to represent this character.
  19363.  
  19364.  null character
  19365.  The ASCII character encoded as the value 0, represented as an escape
  19366.  sequence (\0) in a source file.
  19367.  
  19368.  null pointer
  19369.  A pointer to nothing, expressed as the value 0.
  19370.  
  19371.  object code
  19372.  Relocatable machine code, created by a compiler.
  19373.  
  19374.  object file
  19375.  A file containing relocatable machine code, created as the result of
  19376.  compiling a source file.
  19377.  
  19378.  object module
  19379.  A component of a library. An object file becomes an object module when it is
  19380.  loaded into a library.
  19381.  
  19382.  operand
  19383.  A constant or variable value that is manipulated in an expression.
  19384.  
  19385.  operator
  19386.  One or more symbols that specify how the operand or operands of an
  19387.  expression are manipulated.
  19388.  
  19389.  overlay
  19390.  Part of a program that is read into memory from disk only if and when it is
  19391.  needed.
  19392.  
  19393.  parent process
  19394.  A process that generates a child process using one of the spawn, exec, or
  19395.  system families of run-time-library functions.
  19396.  
  19397.  pointer
  19398.  A variable containing the address of another variable, function, or
  19399.  constant.
  19400.  
  19401.  pragma
  19402.  An instruction to the compiler to perform an action at compile time.
  19403.  
  19404.  precedence
  19405.  The relative position of an operator in the hierarchy that determines the
  19406.  order in which expressions are evaluated.
  19407.  
  19408.  preprocessor
  19409.  A text processor that manipulates the contents of a C source file during the
  19410.  first phase of compilation.
  19411.  
  19412.  preprocessor directive
  19413.  See "directive."
  19414.  
  19415.  prototype
  19416.  See "function prototype."
  19417.  
  19418.  pseudotarget
  19419.  A target, in an NMAKE description file, that is not a file but is used as a
  19420.  label for performing a set of commands.
  19421.  
  19422.  QCL
  19423.  The command that invokes the Microsoft QuickC compiler to compile and link
  19424.  programs.
  19425.  
  19426.  relocatable
  19427.  Not containing absolute addresses; therefore, eligible to be placed in
  19428.  memory at any location.
  19429.  
  19430.  response file
  19431.  A file that contains command-line arguments or responses to program prompts.
  19432.  Response files may be used as input to QLINK, LIB, and NMAKE.
  19433.  
  19434.  run time
  19435.  The time during which a previously compiled and linked program is executing.
  19436.  
  19437.  
  19438.  run-time library
  19439.  A file containing the routines needed to implement certain functions of the
  19440.  Microsoft QuickC language.
  19441.  
  19442.  scope
  19443.  The parts of a program in which an item can be referenced by name. The scope
  19444.  of an item may be limited to the file, function, block, or function
  19445.  prototype in which it appears.
  19446.  
  19447.  segment
  19448.  An area of memory, less than or equal to 64K long, that usually contains
  19449.  either code or data. In the tiny memory model, a segment may contain both.
  19450.  
  19451.  small memory model
  19452.  A memory model that allows for only one code segment and only one data
  19453.  segment.
  19454.  
  19455.  source file
  19456.  A text file containing C-language code.
  19457.  
  19458.  stack
  19459.  A dynamically shrinking and expanding area of memory in which data items are
  19460.  stored in consecutive order and removed on a last in, first out basis.
  19461.  
  19462.  stack probe
  19463.  A short routine called on entry to a function to verify that there is enough
  19464.  room in the program stack to allocate local variables required by the
  19465.  function and, if so, to allocate those variables.
  19466.  
  19467.  static
  19468.  A storage class that allows variables to keep their values even after the
  19469.  program exits the block in which the variable is declared.
  19470.  
  19471.  string
  19472.  An array of characters, terminated by a null character (\0).
  19473.  
  19474.  string constant
  19475.  A string of characters and escape sequences enclosed in double quotation
  19476.  marks (" "). Every string constant is an array of elements of type char.
  19477.  
  19478.  subscript expression
  19479.  An expression, usually used to reference array elements, representing an
  19480.  address that is offset from a specified base address by a given number of
  19481.  positions.
  19482.  
  19483.  target
  19484.  The object of an NMAKE description block.
  19485.  
  19486.  tiny memory model
  19487.  A memory model that allows for only one segment, which contains both code
  19488.  and data, and that produces a .COM file.
  19489.  
  19490.  type cast
  19491.  An operation in which a value of one type is converted to a value of a
  19492.  different type.
  19493.  
  19494.  type checking
  19495.  An operation in which the compiler verifies that the operands of an operator
  19496.  are valid or that the actual arguments in a function call are of the same
  19497.  types as the corresponding formal parameters in the function definition and
  19498.  function prototype.
  19499.  
  19500.  type declaration
  19501.  A declaration that defines the name and members of a structure or union
  19502.  type, or the name and enumeration set of an enumeration type.
  19503.  
  19504.  unary expression
  19505.  An expression consisting of a single operand preceded or followed by a unary
  19506.  operator.
  19507.  
  19508.  unary operator
  19509.  An operator that takes a single operand. Unary operators in the C language
  19510.  are the complement operators (- ~ !), indirection operator (*), increment
  19511.  (++) and decrement (- -) operators, address-of operator (&), and sizeof
  19512.  operator. The unary plus operator (+) is legal but has no effect.
  19513.  
  19514.  unresolved reference
  19515.  A reference to a global or external variable or function that cannot be
  19516.  found, either in the modules being linked or in the libraries that are
  19517.  linked with those modules.
  19518.  
  19519.  white-space character
  19520.  A space, tab, line-feed, carriage-return, form-feed, vertical-tab, or
  19521.  new-line character.
  19522.  
  19523.  wild card
  19524.  One of the DOS characters (? and *) that can be expanded into one or more
  19525.  characters in file-name references.
  19526.  
  19527.  
  19528.  
  19529.  
  19530.  
  19531.  INDEX
  19532.  ──────────────────────────────────────────────────────────────────────────
  19533.  
  19534.  
  19535.  
  19536.  {} (braces), NMAKE character
  19537.  :: (double colon), NMAKE separator
  19538.  -* (minus sign-asterisk), LIB command symbol
  19539.    command-line example
  19540.    described
  19541.    list
  19542.  -+ (minus sign-plus sign), LIB command symbol
  19543.  $@ macro
  19544.  $* macro
  19545.  $? macro
  19546.  $@ macro
  19547.  $* macro
  19548.  $? macro
  19549.  $< macro
  19550.  $? macro
  19551.  * (asterisk), LIB command symbol
  19552.  @ (at sign), NMAKE special character
  19553.  \ (backslash), NMAKE continuation character
  19554.  ^ (caret), NMAKE escape character
  19555.  : (colon)
  19556.    NMAKE separator
  19557.    QLINK command symbol
  19558.  , (comma)
  19559.    LIB command symbol
  19560.    QLINK command symbol
  19561.  - (dash)
  19562.    NMAKE special character
  19563.    QCL option character
  19564.  $ (dollar sign), NMAKE macros, used in
  19565.  ! (exclamation point)
  19566.    NMAKE directives, used in
  19567.    NMAKE special character
  19568.  / (forward slash), option character (QCL)
  19569.  - (minus sign), LIB command symbol
  19570.  # (number sign), NMAKE comment character
  19571.  + (plus sign)
  19572.    LIB command symbol
  19573.    QLINK command symbol
  19574.  ; (semicolon);LIB command symbol
  19575.  ; (semicolon);NMAKE command separator
  19576.  ; (semicolon);QLINK command symbol
  19577.  $** macro
  19578.  80186 processor
  19579.  80286 processor
  19580.  8087/80287 coprocessor, suppressing use of
  19581.  $$@ macro
  19582.  
  19583.      A
  19584.  /A option
  19585.    ILINK
  19586.    NMAKE
  19587.  &(ampersand), LIB continuation symbol
  19588.  /AC option (QCL)
  19589.  Addresses
  19590.    components
  19591.    far
  19592.    huge
  19593.    near
  19594.    segment start
  19595.  AFLAGS, NMAKE macro
  19596.  /AH option (QCL)
  19597.  /AL option (QCL)
  19598.  Alignment types
  19599.  /AM option (QCL)
  19600.  Ampersand (&), LIB continuation symbol
  19601.  Archives, XENIX
  19602.  Argument-type list
  19603.    defined
  19604.  Arguments
  19605.    QLINK options
  19606.    variable number of
  19607.  /AS option (QCL)
  19608.  AS, NMAKE macro
  19609.  Assembly-language files, specifying
  19610.  Asterisk (*), LIB command symbol
  19611.  /Astring option (QCL)
  19612.  /AT option (QCL)
  19613.  At sign (@), NMAKE special character
  19614.  
  19615.      B
  19616.  /BA option (QLINK)
  19617.  Backslash (\), NMAKE continuation character
  19618.  Batch files, exit codes
  19619.  /batch option (QCL)
  19620.  BEGDATA class name
  19621.  Braces ({}), NMAKE character
  19622.  BSS class name
  19623.  
  19624.      C
  19625.  /C option
  19626.    ILINK
  19627.    NMAKE
  19628.  /c option
  19629.    QCL
  19630.  /C option
  19631.    QCL
  19632.  Calling conventions
  19633.  Canonical frame number
  19634.     see Frame number; see
  19635.  Caret (^), NMAKE escape character
  19636.  Case sensitivity
  19637.    QLINK
  19638.  CC, NMAKE macro
  19639.  _cdecl keyword
  19640.    /Za option, used with
  19641.    defined
  19642.    include files, used in
  19643.  CFLAGS, NMAKE macro
  19644.  char type, changing default
  19645.  _CHAR_UNSIGNED predefined identifier
  19646.  check_pointer pragma
  19647.  check_stack pragma
  19648.  Class names
  19649.  !CMDSWITCHES directive (NMAKE)
  19650.  /CO option (QLINK)
  19651.  CODE class name
  19652.  Code segment
  19653.  colon (:)
  19654.    NMAKE separator
  19655.  Colon (:)
  19656.    QLINK command symbol
  19657.  .COM file, creating
  19658.  .COM files, creating
  19659.  Combine types
  19660.    COMMON
  19661.    PRIVATE
  19662.    PUBLIC
  19663.    STACK
  19664.  Comma (, )
  19665.    LIB command symbol
  19666.    QLINK command symbol
  19667.  Command line
  19668.    error messages
  19669.    LIB
  19670.    NMAKE
  19671.      defining macros on
  19672.      described
  19673.      rules for
  19674.      special characters
  19675.    QLINK
  19676.  Commands
  19677.    CL, defined. See QCL command
  19678.    NMAKE description file
  19679.    QCL, described
  19680.  Comments
  19681.    NMAKE description file
  19682.    preserving
  19683.  COMMON combine type
  19684.  Compact memory model
  19685.     see Memory models, compact; see
  19686.  Compatibility, floating-point options
  19687.  Compilation
  19688.    conditional
  19689.    defined
  19690.    error messages
  19691.    incremental
  19692.    suppressing
  19693.  Compiler error messages
  19694.    categories
  19695.    command line
  19696.    compilation
  19697.    fatal
  19698.    warning
  19699.  Compiler limits
  19700.  Compiler options
  19701.     see QCL options; see
  19702.  Consistency checking, LIB
  19703.  Controlling
  19704.    data loading
  19705.    executable-file loading
  19706.    number of segments
  19707.    preprocessor
  19708.    stack size
  19709.  Conversion, pointer arguments
  19710.  Coprocessor, 8087/80287, suppressing use of
  19711.  /CP option (QLINK)
  19712.  Cross-reference listing file, LIB
  19713.  Customized memory models. See Memory models, customized
  19714.  
  19715.      D
  19716.  /D option
  19717.    NMAKE
  19718.    QCL
  19719.  Dash (-)
  19720.    NMAKE special character
  19721.    QCL option character
  19722.  Data segment
  19723.  _DATA segment
  19724.  Data segment
  19725.  Debugging
  19726.    /CODEVIEW option (QLINK)
  19727.    /Zi and /Zd options
  19728.    incrementally linked programs
  19729.    QCL option for
  19730.  Declarations, maximum level of nesting
  19731.  Defaults
  19732.    LIB responses
  19733.    libraries
  19734.      ignoring
  19735.      suppressing selection
  19736.    NMAKE, MAKEFILE
  19737.    QLINK responses
  19738.  Dependency lines
  19739.  Dependents
  19740.    described
  19741.    directory searches
  19742.    macros for
  19743.    specifying
  19744.  Description blocks
  19745.    defined
  19746.    described
  19747.    inference rules, used with
  19748.    multiple for one target
  19749.  Description files (NMAKE)
  19750.    backslash as continuation character
  19751.    command lines
  19752.    comments
  19753.    described
  19754.    error handling
  19755.    macro definitions in
  19756.    omitting commands from
  19757.    specifying
  19758.  DGROUP segments
  19759.  Directives (NMAKE)
  19760.    !CMDSWITCHES
  19761.    !ELSE
  19762.    !ENDIF
  19763.    !ERROR
  19764.    !IF
  19765.    !IFDEF
  19766.    !IFNDEF
  19767.    !INCLUDE
  19768.    !UNDEF
  19769.    defined
  19770.    described
  19771.    using
  19772.  /DO option (QLINK)
  19773.  Document conventions
  19774.  Dollar sign ($), NMAKE macros
  19775.  .DOSSEG directive
  19776.  /DS option (QLINK)
  19777.  DS register
  19778.  
  19779.      E
  19780.  /E option
  19781.    ILINK
  19782.    NMAKE
  19783.    QCL
  19784.    QLINK
  19785.  80186 processor
  19786.  80286 processor
  19787.  8087/80287 coprocessor, suppressing use of
  19788.  _edata linker variable
  19789.  !ELSE directive (NMAKE)
  19790.  Emulator, floating-point
  19791.  _end linker variable
  19792.  !ENDIF directive (NMAKE)
  19793.  Environment variables
  19794.    CL
  19795.    INCLUDE
  19796.    LIB
  19797.    LINK
  19798.    NO87
  19799.    TMP
  19800.  /EP option (QCL)
  19801.  !ERROR directive (NMAKE)
  19802.  Error handling, NMAKE
  19803.  Error level codes
  19804.     see Exit codes; see
  19805.  Error messages
  19806.    compiler
  19807.      categories
  19808.      command line
  19809.      compilation
  19810.      correctable
  19811.      fatal
  19812.      warning
  19813.    floating-point exceptions
  19814.    ILINK
  19815.    LIB
  19816.    NMAKE
  19817.    QLINK
  19818.    run-time
  19819.    types of
  19820.  Escape character, NMAKE
  19821.  Exceptions, listed
  19822.  Exclamation point (!)
  19823.    NMAKE directives, used in
  19824.    NMAKE special character
  19825.  Executable files
  19826.    contents
  19827.    creating
  19828.    extensions
  19829.    loading
  19830.    naming
  19831.      default
  19832.      QCL
  19833.      QLINK
  19834.    packing
  19835.    QLINK, specifying with
  19836.      prompts
  19837.      response file
  19838.  Executable image
  19839.  Execution-time optimization
  19840.  Exit codes
  19841.    DOS batch files, used with
  19842.    error level
  19843.    NMAKE
  19844.    programs for
  19845.    using
  19846.  Expressions
  19847.  Extensions
  19848.    .SUFFIXES list
  19849.    default, QLINK
  19850.    executable files
  19851.    inference rules
  19852.    libraries
  19853.      LIB, used with
  19854.      QLINK, used with
  19855.    listing files, defaults for
  19856.    map files
  19857.    object files
  19858.  
  19859.      F
  19860.  /F option
  19861.    NMAKE
  19862.    QCL
  19863.    QLINK
  19864.  Far calls
  19865.  _far keyword
  19866.    /Za option, used with
  19867.    default addressing conventions
  19868.    effects
  19869.      data declarations
  19870.      function declarations
  19871.    library routines, used with
  19872.    restriction for in-memory programs
  19873.    small-model programs
  19874.  Far pointers
  19875.  _fastcall keyword
  19876.  Fatal error messages
  19877.  /Fe option (QCL)
  19878.  File names
  19879.    extensions
  19880.    path names
  19881.    uppercase and lowercase letters in
  19882.  Files
  19883.     see also ; see also
  19884.    object
  19885.      defined
  19886.    RMFIXUP.OBJ
  19887.    source, defined
  19888.    temporary, space requirements
  19889.  FIXSHIFT utility
  19890.  Fixups
  19891.  Floating-point
  19892.    operations
  19893.      error messages
  19894.      exceptions
  19895.    options
  19896.  /Fm option (QCL)
  19897.  /Fo option (QCL)
  19898.  _fortran keyword
  19899.  Forward slash (/), QCL option character
  19900.  /FPi option (QCL)
  19901.  /FPi87 option (QCL)
  19902.  Frame number
  19903.  Functions
  19904.    arguments, variable number of
  19905.    calling conventions
  19906.    declaring near and far
  19907.  
  19908.      G
  19909.  /G0 option (QCL)
  19910.  /G1 option (QCL)
  19911.  /G2 option (QCL)
  19912.  /Gc option (QCL)
  19913.  /Gd option (QCL)
  19914.  /Ge option (QCL)
  19915.  /Gi option (QCL)
  19916.  Global region
  19917.  Global symbols
  19918.     see Public symbols; see
  19919.  /Gr option (QCL)
  19920.  Graphics, Hercules
  19921.  Groups
  19922.    DGROUP
  19923.    linking procedures, used in
  19924.  /Gs option (QCL)
  19925.  /Gt option (QCL)
  19926.  /Gw option (QCL)
  19927.  /GW option (QCL)
  19928.  
  19929.      H
  19930.  /HE option (QLINK)
  19931.  /HELP option
  19932.    ILINK
  19933.    NMAKE
  19934.    QCL
  19935.  Hercules display adapter
  19936.  /HI option (QLINK)
  19937.  Huge arrays
  19938.  _huge keyword
  19939.    default addressing conventions
  19940.    described
  19941.  Huge memory model
  19942.     see Memory models; see
  19943.  
  19944.      I
  19945.  /I option
  19946.    ILINK
  19947.    NMAKE
  19948.    QCL
  19949.  Identifiers
  19950.    length, maximum
  19951.    predefined
  19952.      listed
  19953.      MSDOS
  19954.      M_I286
  19955.      M_I8086
  19956.      M_I86
  19957.      M_I86xM
  19958.      NO_EXT_KEYS
  19959.      removing definitions of
  19960.      _CHAR_UNSIGNED
  19961.  !IF directive (NMAKE)
  19962.  !IFDEF directive (NMAKE)
  19963.  !IFNDEF directive (NMAKE)
  19964.  .IGNORE pseudotarget
  19965.  Ignoring
  19966.    case, QLINK
  19967.    default libraries, QLINK
  19968.  ILINK
  19969.    command
  19970.    error messages
  19971.    options
  19972.  In-line instructions
  19973.  /INC option (QLINK)
  19974.  !INCLUDE directive (NMAKE)
  19975.  INCLUDE environment variable
  19976.    NMAKE, used with
  19977.    overriding
  19978.  Include files
  19979.    defined
  19980.    directory specification
  19981.    search paths
  19982.      maximum number of
  19983.      specifying
  19984.  Incremental compilation
  19985.  Incremental linking
  19986.  Incremental violations
  19987.  /INF option (QLINK)
  19988.  Inference rules
  19989.    defined
  19990.    defining
  19991.    described
  19992.    precedence
  19993.    predefined
  19994.  Instruction sets
  19995.    80186 processor
  19996.    80286 processor
  19997.    8086/8088 processor
  19998.  Invoking
  19999.    LIB
  20000.      command line
  20001.      prompts
  20002.      response file
  20003.    NMAKE
  20004.      command line
  20005.      response file
  20006.    QCL
  20007.    QLINK
  20008.      command line
  20009.      prompts
  20010.      response file
  20011.  
  20012.      J
  20013.  /J option (QCL)
  20014.  
  20015.      K
  20016.  Keywords
  20017.    defined
  20018.    _cdecl
  20019.    _far. See _far keyword
  20020.    _fastcall
  20021.    _fortran
  20022.    _huge. See _huge keyword
  20023.    _near. See _near keyword
  20024.    _pascal
  20025.  
  20026.      L
  20027.  Language extensions
  20028.    disabling
  20029.    listed
  20030.  Large memory model
  20031.     see Memory models, large; see
  20032.  /Lc option (QCL)
  20033.  /Li option (QCL)
  20034.  /LI option (QLINK)
  20035.  LIB command symbols
  20036.    asterisk (*)
  20037.    listed
  20038.    minus sign (-)
  20039.    minus sign-asterisk (-*)
  20040.    minus sign-plus sign (-+)
  20041.    plus sign (+)
  20042.  LIB
  20043.    command syntax
  20044.    consistency checking
  20045.    default responses
  20046.    environment variable
  20047.    error messages
  20048.    extending lines
  20049.    input
  20050.    libraries
  20051.      combining
  20052.      creating
  20053.      index
  20054.    listing files
  20055.    modules
  20056.      adding and deleting
  20057.      adding
  20058.      copying
  20059.      deleting
  20060.      extracting
  20061.      moving
  20062.      replacing
  20063.    operations, order of
  20064.    output
  20065.    running
  20066.      command line
  20067.      prompts
  20068.      response file
  20069.  Libraries
  20070.     see also LIB; see also
  20071.    8087/80287 coprocessor
  20072.    automatic object-file processing
  20073.    creating
  20074.      /Zl, compiling modules with
  20075.      described
  20076.    defined
  20077.    emulator
  20078.    Intel
  20079.    load
  20080.    mLIBC7.LIB
  20081.    mLIBCE.LIB
  20082.    modifying
  20083.    naming
  20084.    object code
  20085.    regular
  20086.    run time, defined
  20087.    search
  20088.      order
  20089.      paths
  20090.    specifying
  20091.      QCL command line
  20092.      QLINK command line
  20093.      QLINK prompts
  20094.      QLINK response file
  20095.    standard
  20096.      listed
  20097.      overriding
  20098.      selecting
  20099.    uses of
  20100.  Limits
  20101.    arguments
  20102.    compiler
  20103.    macros
  20104.  /link option (QCL)
  20105.  Linker utility
  20106.     see QLINK; see
  20107.  Linking
  20108.    defined
  20109.    incremental
  20110.  Listing files
  20111.    LIB
  20112.    preprocessed
  20113.  Load libraries, QLINK
  20114.  Loop optimization
  20115.  /Lr option (QCL)
  20116.  
  20117.      M
  20118.  /M option (QLINK)
  20119.  Macros
  20120.    NMAKE
  20121.      $$@
  20122.      $*
  20123.      $**
  20124.      $<
  20125.      $?
  20126.      $@
  20127.      AFLAGS
  20128.      AS
  20129.      CC
  20130.      CFLAGS
  20131.      defined
  20132.      defining
  20133.      dependent names, used for
  20134.      inherited
  20135.      MAKE
  20136.      MAKEDIR
  20137.      MAKEFLAGS
  20138.      modifiers
  20139.      precedence of definitions
  20140.      precedence
  20141.      predefined
  20142.      substitution
  20143.      target names, used for
  20144.      testing definition
  20145.      undefined
  20146.      user-defined
  20147.      using
  20148.    preprocessor, limits
  20149.  MAKE macro
  20150.  MAKEDIR macro
  20151.  MAKEFILE
  20152.  MAKEFLAGS macro
  20153.  Map files
  20154.    /MAP (/M) option (QLINK)
  20155.    /MAP (/M) option, (QLINK)
  20156.    contents
  20157.    creating
  20158.      QCL
  20159.      QLINK
  20160.    extensions
  20161.    format
  20162.    frame numbers, obtaining
  20163.    line numbers
  20164.    naming with QLINK
  20165.  MDT (module-description table)
  20166.  MDT
  20167.     see Module-description table; see
  20168.  Medium memory model
  20169.     see Memory models, medium; see
  20170.  Memory addresses
  20171.     see Addresses; see
  20172.  Memory models
  20173.    compact
  20174.    customized
  20175.    default libraries
  20176.    default
  20177.    defined
  20178.    described
  20179.    huge
  20180.    large
  20181.    medium
  20182.    mixed
  20183.    packing segments
  20184.    small
  20185.    standard
  20186.    tiny
  20187.    variable-stack files
  20188.  Microsoft QLINK
  20189.     see QLINK; see
  20190.  Minus sign (-), LIB command symbol
  20191.  Minus sign-asterisk (-*), LIB command symbol
  20192.    command-line example
  20193.    described
  20194.    list
  20195.  Minus sign-plus sign (-+), LIB command symbol
  20196.  mLIBC7.LIB
  20197.  MLIBC7.LIB
  20198.  mLIBCE.LIB
  20199.  MLIBCE.LIB
  20200.  Module description table (MDT)
  20201.  Module-description table (MDT)
  20202.  Mouse
  20203.  MSDOS predefined identifier
  20204.  MSHERC.COM
  20205.  M_I286 predefined identifier
  20206.  M_I8086 predefined identifier
  20207.  M_I86 predefined identifier
  20208.  M_I86xM predefined identifier
  20209.  
  20210.      N
  20211.  /N option (NMAKE)
  20212.  Names
  20213.     executable files
  20214.    code segment, changing
  20215.    data segment, changing
  20216.    DOS file
  20217.    executable files
  20218.    map files
  20219.    object files
  20220.  Naming conventions
  20221.  /ND option (QCL)
  20222.  _near keyword
  20223.    /Za option, used with
  20224.    default addressing conventions
  20225.    effects in
  20226.      data declarations
  20227.      function declarations
  20228.  Near pointer
  20229.  Nesting, declarations
  20230.  NMAKE directives
  20231.    !CMDSWITCHES
  20232.    !ELSE
  20233.    !ENDIF
  20234.    !ERROR
  20235.    !IF
  20236.    !IFDEF
  20237.    !IFNDEF
  20238.    !INCLUDE
  20239.    !UNDEF
  20240.    defined
  20241.    described
  20242.    listed
  20243.    operators
  20244.    using
  20245.  NMAKE options
  20246.    /A
  20247.    /C
  20248.    /D
  20249.    /E
  20250.    /F
  20251.    /HELP
  20252.    /I
  20253.    /N
  20254.    /NOLOGO
  20255.    /P
  20256.    /Q
  20257.    /R
  20258.    /S
  20259.    /T
  20260.    /X
  20261.  NMAKE
  20262.    command line
  20263.    commands
  20264.      modifying
  20265.      specifying
  20266.    comments in description file
  20267.    controlling
  20268.      execution
  20269.      input
  20270.      output
  20271.    dependency lines
  20272.    dependents
  20273.      defined
  20274.      specifying
  20275.    description blocks
  20276.    description file
  20277.      backslash as continuation character
  20278.      command line
  20279.      described
  20280.      error handling
  20281.      specifying
  20282.    double-colon (::) separator
  20283.    error handling
  20284.    error messages
  20285.    escape character
  20286.    exit codes
  20287.    in-line files
  20288.    inference rules
  20289.      defined
  20290.      defining
  20291.      precedence
  20292.      predefined
  20293.      using
  20294.    invoking
  20295.    macro substitution
  20296.    macros. See Macros, NMAKE
  20297.    options. See NMAKE options
  20298.    pseudotargets
  20299.    response files
  20300.    special characters
  20301.    targets
  20302.      command line
  20303.      defined
  20304.      description blocks
  20305.      specifying
  20306.    wildcards
  20307.  NO87 environment variable
  20308.  /NOD option (QLINK)
  20309.    default libraries, overriding
  20310.    described
  20311.  /NOF option (QLINK)
  20312.  /NOG option (QLINK)
  20313.  /NOI option
  20314.    QLINK
  20315.  /NOL option
  20316.    QLINK
  20317.  /nologo option (QCL)
  20318.  /NOLOGO option
  20319.    ILINK
  20320.    NMAKE
  20321.  /NON option (QLINK)
  20322.  /NOP option (QLINK)
  20323.  NO_EXT_KEYS
  20324.  /NT option (QCL)
  20325.  NULL constant
  20326.  Number sign (#), NMAKE comment character
  20327.  
  20328.      O
  20329.  /O option
  20330.    QCL
  20331.  /O option
  20332.    QLINK
  20333.  Object files
  20334.    creating
  20335.    default
  20336.      extensions
  20337.      library names
  20338.      names
  20339.    defined
  20340.    inference rules, specified in
  20341.    LIB input
  20342.    linking
  20343.      QCL command line
  20344.      QLINK command line
  20345.      QLINK prompts
  20346.      QLINK response file
  20347.    naming
  20348.      /Fo options
  20349.      default
  20350.    RMFIXUP.OBJ
  20351.    variable stack
  20352.  Object modules
  20353.    defined
  20354.    libraries
  20355.      deleting from
  20356.      extracting and deleting from
  20357.      including in
  20358.      QLINK
  20359.    listing (LIB)
  20360.  /Od option (QCL)
  20361.  /Oi option (QCL)
  20362.  /Ol option (QCL)
  20363.  /On option (QCL)
  20364.  Optimization
  20365.    far calls
  20366.    QCL options, used for
  20367.  Options, LIB
  20368.     see LIB options; see
  20369.  Options, QCL
  20370.     see QCL options; see
  20371.  Options, QLINK
  20372.     see QLINK options; see
  20373.  /Ot option (QCL)
  20374.  Overlays
  20375.    debugging
  20376.    defined
  20377.    interrupt number, setting
  20378.    overlay-manager prompts
  20379.    QLINK, specifying
  20380.    restrictions
  20381.    using
  20382.  /Ox option (QCL)
  20383.  
  20384.      P
  20385.  /P option
  20386.    NMAKE
  20387.    QCL
  20388.  pack pragma
  20389.  /PACKC option (QLINK)
  20390.  /PACKD option (QLINK)
  20391.  Packing
  20392.    contiguous segments
  20393.    executable files, QLINK
  20394.    structure members
  20395.  /PADC option (QLINK)
  20396.  /PADD option (QLINK)
  20397.  Palettes
  20398.    defined
  20399.  Paragraph space
  20400.  _pascal keyword
  20401.  Path names, QCL command line
  20402.  /PAU option (QLINK)
  20403.  Physical coordinates
  20404.    defined
  20405.  Plus sign (+)
  20406.    LIB command symbol
  20407.    QLINK command symbol
  20408.  Pointers
  20409.     keywords, _near, _far, _huge
  20410.    arguments, size conversion
  20411.    checking
  20412.    null
  20413.    subtracting in huge-model programs
  20414.  Pragmas
  20415.    check_pointer
  20416.    check_stack
  20417.    pack
  20418.  .PRECIOUS pseudotarget
  20419.  Preprocessor
  20420.    limits
  20421.    listings, creating
  20422.    predefined identifiers, removing definitions of
  20423.    preserving comments
  20424.  PRIVATE combine type
  20425.  Processors
  20426.    80186
  20427.    80286
  20428.    8086/8088
  20429.    listings, creating
  20430.  Pseudotargets
  20431.  PUBLIC combine type
  20432.  Public symbols
  20433.    LIB
  20434.    QCL
  20435.    QLINK
  20436.  
  20437.      Q
  20438.  /Q option (NMAKE)
  20439.  QCL command
  20440.    batch mode operation
  20441.    command line, described
  20442.    exit codes
  20443.    file names
  20444.    path names
  20445.  QCL options
  20446.    /AC
  20447.    /AH
  20448.    /AL
  20449.    /AM
  20450.    /AS
  20451.    /Astring
  20452.    /AT
  20453.    /batch
  20454.    /c
  20455.    /C
  20456.    /c
  20457.    /C
  20458.    /D
  20459.    /E
  20460.    /EP
  20461.    /F
  20462.    /Fe
  20463.    /Fm
  20464.    /Fo
  20465.    /FPi
  20466.    /FPi87
  20467.    /G0
  20468.    /G1
  20469.    /G2
  20470.    /Gc
  20471.    /Gd
  20472.    /Ge
  20473.    /Gi
  20474.    /Gr
  20475.    /Gs
  20476.    /Gt
  20477.    /Gw
  20478.    /GW
  20479.    /HELP
  20480.    /I
  20481.    /J
  20482.    /Lc
  20483.    /Li
  20484.    /link
  20485.    /Lr
  20486.    /ND
  20487.    /nologo
  20488.    /NT
  20489.    /O
  20490.    /Od
  20491.    /Oi
  20492.    /Ol
  20493.    /On
  20494.    /Ot
  20495.    /Ox
  20496.    /P
  20497.    /Ta
  20498.    /Tc
  20499.    /U and /u
  20500.    /V
  20501.    /W options
  20502.    /X
  20503.    /Za
  20504.    /Zd
  20505.    /Ze
  20506.    /Zi
  20507.    /Zl
  20508.    /Zp
  20509.    /Zr
  20510.    /Zs
  20511.    8086/8088, 80186, or 80286 processors
  20512.    assembly language file, specifying
  20513.    C calling convention
  20514.    case sensitivity of
  20515.    CL environment variable, specified in
  20516.    code segments, naming
  20517.    command line, order on
  20518.    constants
  20519.    data segments, naming
  20520.    data threshold, setting
  20521.    debugging, preparing for
  20522.    default char type, changing
  20523.    executable files, naming
  20524.    floating-point
  20525.      coprocessor
  20526.      default
  20527.      emulator
  20528.      in-line instructions
  20529.      libraries
  20530.    format
  20531.    FORTRAN/Pascal calling convention
  20532.    include files, searching for
  20533.    incremental compilation
  20534.    language extensions, disabling
  20535.    libraries
  20536.      floating-point
  20537.      omitting
  20538.      standard
  20539.    listing
  20540.    map files, creating
  20541.    memory models
  20542.      choosing
  20543.      compact
  20544.      default libraries
  20545.      huge
  20546.      large
  20547.      medium
  20548.      small
  20549.      tiny
  20550.      variable-stack files
  20551.    object files, naming
  20552.    optimization
  20553.      execution time
  20554.      maximum
  20555.      summary
  20556.      turning off
  20557.    option characters
  20558.    output files, naming
  20559.    predefined identifiers, removing
  20560.    preprocessor listings
  20561.      creating
  20562.      naming
  20563.      preserving comments
  20564.    register calling convention
  20565.    source file, specifying
  20566.    stack checking
  20567.    structures, packing
  20568.    syntax checking
  20569.    warning levels
  20570.  QLINK listing files
  20571.     see Map files; see
  20572.  QLINK options
  20573.    .COM file
  20574.    /BATCH (/BA)
  20575.    /CODEVIEW (/CO)
  20576.    /CPARMAXALLOC (/CP)
  20577.    /DOSSEG (/DO)
  20578.    /DSALLOCATE (/DS)
  20579.    /EXEPACK (/E)
  20580.    /FARCALLTRANSLATION (/F)
  20581.    /HELP (/HE)
  20582.    /HIGH (/HI)
  20583.    /INCREMENTAL (/INC)
  20584.    /INFORMATION (/INF)
  20585.    /LINENUMBERS (/LI)
  20586.    /MAP (/M)
  20587.    /NODEFAULTLIBRARYSEARCH (/NOD)
  20588.      default libraries, overriding
  20589.      described
  20590.    /NODEFAULTLIBRARYSEARCH (NOD)
  20591.      described
  20592.    /NOFARCALLTRANSLATION (/NOF)
  20593.    /NOGROUPASSOCIATION (/NOG)
  20594.    /NOIGNORECASE (/NOI)
  20595.    /NOLOGO (/NOL)
  20596.    /NONULLSDOSSEG (/NON)
  20597.    /NOPACKCODE (/NOP)
  20598.    /OVERLAYINTERRUPT (/O)
  20599.    /PACKCODE (/PACKC)
  20600.    /PACKCODE (/PACKC). See also /FARCALLTRANSLATION; /NOPACKCODE
  20601.    /PACKDATA (/PACKD)
  20602.    /PADCODE (/PADC)
  20603.    /PADDATA (/PADD)
  20604.    /PAUSE (/PAU)
  20605.    /SEGMENTS (/SE)
  20606.    /STACK (/ST)
  20607.    /TINY (/T)
  20608.    abbreviations
  20609.    batch mode, running in
  20610.    case sensitivity
  20611.    command line, specifying on
  20612.    compatibility, preserving
  20613.    controlling process
  20614.    data loading
  20615.    debugging
  20616.    default libraries, ignoring
  20617.    displaying with /HELP (/HE)
  20618.    environment variable, using
  20619.    executable files
  20620.      loading
  20621.      modifying
  20622.      packing
  20623.    format
  20624.    line numbers, displaying
  20625.    linker prompting, preventing
  20626.    map file
  20627.    numerical arguments
  20628.    optimizing
  20629.    ordering segments
  20630.    overlay interrupt, setting
  20631.    paragraph space, allocating
  20632.    pausing
  20633.    process information, displaying
  20634.    QCL, used with
  20635.    segments
  20636.    stack size, setting
  20637.  QLINK
  20638.    defaults
  20639.      command line
  20640.      responses
  20641.    environment variable
  20642.    error messages
  20643.    executable file
  20644.    exiting
  20645.    file-name conventions
  20646.    granularity
  20647.    libraries
  20648.      load
  20649.      overriding
  20650.      regular
  20651.      search path
  20652.    map file
  20653.    memory requirements
  20654.    modules, moving
  20655.    operation
  20656.    overlays
  20657.    running
  20658.      described
  20659.      prompts
  20660.      QCL command line
  20661.      QLINK command line
  20662.      response file
  20663.    segments
  20664.      alignment types
  20665.      combine types
  20666.      fixups
  20667.      frame number
  20668.      groups
  20669.      ordering
  20670.    temporary output file
  20671.  
  20672.      R
  20673.  /R option (NMAKE)
  20674.  Recursion
  20675.  References
  20676.  Register calling convention
  20677.  Registers, DS
  20678.  Regular libraries, QLINK command line
  20679.  Relocatable, defined
  20680.  Relocation information
  20681.  Response files
  20682.    LIB
  20683.    NMAKE
  20684.    QLINK
  20685.  Return codes
  20686.     see Exit codes; see
  20687.  RMFIXUP.OBJ file
  20688.  Run-time error messages
  20689.  
  20690.      S
  20691.  /S option (NMAKE)
  20692.  /SE option (QLINK)
  20693.  Search paths
  20694.    dependents
  20695.    include files
  20696.    libraries
  20697.    overlays
  20698.  Segment lists, map files
  20699.  Segments
  20700.    alignment types
  20701.    classes
  20702.    combining
  20703.    data threshold, effect of
  20704.    default names
  20705.    default
  20706.    defined
  20707.    maximum number
  20708.    order
  20709.    packing
  20710.    padding
  20711.    setup codes
  20712.  Semicolon
  20713.    LIB command symbol
  20714.    NMAKE command separator
  20715.    QLINK command symbol
  20716.  sizeof operator
  20717.  Small memory model
  20718.     see Memory models, small; see
  20719.  Source files, specifying
  20720.  Special characters, NMAKE
  20721.  Special keywords, turning off
  20722.  /ST option (QLINK)
  20723.  STACK
  20724.    class name
  20725.    combine type
  20726.  Stack
  20727.    defined
  20728.    probes
  20729.    size, setting
  20730.    variable
  20731.  Standard output device
  20732.  Structures, packing
  20733.  .SUFFIXES pseudotarget
  20734.  Swapping disks during linking
  20735.  Switches
  20736.     see Options; see
  20737.  Symbol tables
  20738.  
  20739.      T
  20740.  /T option (QLINK)
  20741.  /T option
  20742.    NMAKE
  20743.  /Ta option (QCL)
  20744.  Targets
  20745.    default
  20746.    defined
  20747.    macros for
  20748.    specifying
  20749.      description blocks
  20750.      multiple description blocks
  20751.  /Tc option (QCL)
  20752.  Temporary files
  20753.  _TEXT segment
  20754.  Tiny memory model
  20755.     see Memory models, tiny; see
  20756.  TMP environment variable
  20757.  TOOLS.INI file
  20758.    !INCLUDE directive, used with
  20759.    described
  20760.    ignoring inference rules and macros in
  20761.    macros
  20762.    redefining CC in
  20763.  
  20764.      U
  20765.  /U and /u options (QCL)
  20766.  !UNDEF directive (NMAKE)
  20767.  Uppercase letters, use of
  20768.  
  20769.      V
  20770.  /V option (QCL)
  20771.  /V option
  20772.    ILINK
  20773.  Variable-stack files
  20774.  Variables, special
  20775.    _edata
  20776.    _end
  20777.  Version string, embedding
  20778.  VM.TMP file
  20779.  
  20780.      W
  20781.  /W options (QCL)
  20782.  Warning error messages
  20783.    controlling
  20784.    described
  20785.    format
  20786.    listed
  20787.  Wildcards in NMAKE
  20788.  Windows functions calls
  20789.  
  20790.      X
  20791.  /X option
  20792.    ILINK
  20793.    NMAKE
  20794.    QCL
  20795.  
  20796.      Z
  20797.  /Za option (QCL)
  20798.  /Zd option (QCL)
  20799.  /Ze option (QCL)
  20800.  /Zi option (QCL)
  20801.  /Zl option (QCL)
  20802.  /Zp option (QCL)
  20803.  /Zr option (QCL)
  20804.  /Zs option (QCL)
  20805.  
  20806.