C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Response File
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     The CL utility accepts a compiler "response file" as an argument
     on the command line. A response file is an ASCII file that can
     contain multiple options and filenames that you would otherwise
     enter by hand on the command line or by using the CL environment
     variable. Unlike either the command line or the CL environment
     variable, using a response file allows multiple lines of options
     and filenames.
     See: CL Environment Variable
 
     The options in the response file are interpreted as if they were
     present on the command line at the position of the response file
     invocation. An exception to this rule is the /link command. If
     /link appears in the response file, all options on the rest of the
     line are passed to the linker. Options in subsequent lines in
     the response file and options on the command line after the
     response file invocation are still accepted as compiler options.
 
     Note that a response file should not contain the CL command.
     Also, each option must begin and end on the same line; you cannot
     use the backslash (\ to concatenate an option across two lines.
 
     To invoke a response file, enter the at sign (@) followed
     immediately by a filename; you can also specify a drive and path.
     A response file invocation is not allowed in the CL environment
     variable string or in another response file.
 
     For example, you could enter the following into a file named RESP:
 
          /Od /Zp /link SLIBCER.LIB
 
     These options are used by CL in addition to any options you
     specify on the CL command line. If you specify the CL command
 
          CL /Ob2 @RESP MYAPP.C
 
     the resulting command to CL is
 
          CL /Ob2 /Od /Zp MYAPP.C /link SLIBCER.LIB
 
     Note that the commands are effectively concatenated. You can use
     NMAKE to create a temporary response file for a single compilation
     step:
 
          MYAPP.OBJ : MYAPP.C
              CL @<< MYAPP.C
          /DV100 /Lr /Od /Zp
          <<
 
     See also: NMAKE
                                    -♦-