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.
CL Command-Line Options
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
  /AC        Compact Memory Model
  /AH        Huge Memory Model
  /AL        Large Memory Model
  /AM        Medium Memory Model
  /AS        Small Memory Model
  /AT        Tiny Memory Model
  /Astring   Custom Memory Model
  /batch     Batch Mode Operations
  /Bmnumber  Increasing Compiler Capacity
  /c         Compile Without Linking
  /C         Preserve Comments
  /D         Define Constants and Macros
  /E         Preserve #line Directives
  /EP        Remove #line Directives
  /F hexnum  Set Stack Size
  /f         Invoke Fast Compile
  /Fa[file]  Name Assembly Listing File
  /Fc[file]  Name Source/Assembly Listing File
  /Fefile    Name Executable File
  /Fl[file]  Name Object Listing File
  /Fm[file]  Name Linker Map File
  /Fofile    Name Object File
  /Fpfile    Specify Precompiled Header Filename
  /FR[file]  Name Extended Source Browser Information File
  /Fr[file]  Name Source Browser Information File
  /Fs[file]  Name Source Listing File
  /FPa       Fast Alternate Math
  /FPc       Emulation Calls
  /FPc87     80x87 Calls
  /FPi       Inline Emulation
  /FPi87     Inline 80x87 Instructions
  /G0        8086 Instructions
  /G1        80186 Instructions
  /G2        80286 Instructions
  /G3        80386 Instructions
  /G4        80486 Instructions
  /Gc        Pascal Calling Convention
  /Gd        C Calling Convention
  /GA        Optimize Entry/Exit Code for Protected-Mode Windows
  /GD        Optimize Entry/Exit Code for Protected-Mode Windows (DLL)
  /GEstring  Customize Windows Entry/Exit Code
  /Ge        Use Stack-Check Calls
  /Gn        Remove P-Code Native Entry Points
  /Gpnumber  Specifying Entry Tables for P-Code
  /Gq        Real-Mode Windows Entry/Exit Code, C 6.0 Compatible
  /Gr        Fastcall Calling Convention
  /Gs        Remove Stack-Check Calls
  /Gtnumber  Set Data Size Threshold
  /Gw        Real-Mode Windows Entry/Exit Code
  /GW        Real-Mode Windows Entry/Exit Code
  /Gx        Assume That Data Is Near
  /Gy        Enable Function-Level Linking
  /Hnumber   External Name Length
  /HELP      Display Help
  /Ipath     Include-File Directories
  /J         Change Default Character Type
  /Ld        Select Dynamically Linked Library
  /Lw        Select Statically Linked Library
  /link name Provide New Library Name to Linker
  /Ln        Do Not Link CRT.LIB
  /Lr        Link for Real Mode
  /MA        Macro Assembler Options
  /Mq        Compile for QuickWin
  /NDname    Name Data Segment
  /NMname    Name Code Segment, Backwards Compatibility
  /NQname    Name Temporary Segment for P-Code
  /NTname    Name Code Segments
  /NVname    Name Far Virtual Table Segment
  /nologo    Disable CL Banner
  /Oa        Assume No Aliasing
  /Obnumber  Control Inline Expansion
  /Oc        Enable Local Common Subexpression Optimization
  /Od        Disable Optimization
  /Oe        Global Register Allocation
  /Of[-]     Turn On [Off] P-Code Quoting
  /Og        Enable Global-Level Common Subexpression Optimization
  /Oi        Generate Intrinsic Functions
  /Ol        Loop Code Optimization
  /On        Disable Loop Optimization
  /Oo[-]     Turn On [Off] Post Code-Generation Optimization
  /Op[-]     Improve Float Consistency
  /Oq        Maximum P-Code Optimization
  /Or        Common Function-Exit Sequence
  /Os        Optimize for Space
  /Ot        Optimize for Time
  /Ov[-]     P-Code, Toggle Frame Sorting
  /Ow        Alias Only Across Calls
  /Ox        Use Maximum Optimization
  /Oz        Extra Loop/Global Optimization
  /P         Create Preprocessed File
  /qc        Quick Compile
  /Slnumber  Source-Listing Line Width
  /Spnumber  Source-Listing Page Length
  /Ssstring  Source-Listing Subtitle
  /Ststring  Source-Listing Title
  /Tafile    Assembler Source File
  /Tcfile    C Source File
  /Tpfile    C++ Source File
  /u         Remove All Defined Identifiers
  /Uname     Remove Specified Identifier
  /Vstring   Set Version String
  /Wnumber   Set Warning Level
  /X         Ignore Standard Include Directory
  /Yc        Create Precompiled Header File
  /Yd        Place Debug Information in Precompiled Header File
  /Yu        Use Precompiled Header File
  /Za        Disable Microsoft Extensions
  /Zd        Prepare for Debugging
  /Ze        Enable Microsoft Extensions
  /Zf        Accept __far Keyword (32-Bit Only)
  /Zg        Generate Function Prototypes
  /Zi        Prepare for Debug (CodeView)
  /Zl        Omit Default Library Name from Object File
  /Zn        Turn Off SBRPACK Utility
  /Zpnumber  Pack Structs on <number>-Byte Boundaries
  /Zr        Check Null Pointers (/qc only)
  /Zs        Check Syntax Only
                                    -♦-