Share via


General Compiler Command-Line Options

The general compiler supports the following command-line options:

/c - Compile Without Linking

/C - Preserve Comments During Preprocessing

/callcap -Enable callcap profiling

/D - Define Constants and Macros

/E - Copy Preprocessor Output

/EH - Exception Handling Model

/EP - Copy Preprocessor Output

/F - Set Stack Size

/FA - Create Listing Files

/Fa - Rename Assembly-File Listing

/fastcap - Enable fastcap profiling

/Fd - Rename .PDB File

/Fe - Rename Executable File

/FI - Preprocess specified Header File First

/Fm - Create Map File

/Fo - Rename Object File

/Fp - Specify Precompiled Header

/FR, /Fr - Generate Browser Files

/GF - Enable Read-Only String Pooling

/Gf - Enable String Pooling

/GR - Enable Run-Time Type Information

/Gt - Use Common Global Data Area

/GX - Enable Exception Handling

/Gy - Enable Function-Level Linking

/GZ - Catch Release Errors in Debug Build

/H - Restrict Length of External Names

/HELP - List the Compiler Options

/I - Search Directory for Include Files

/J - Change Default char Type

/LD - Create a Dynamic-Link Library

/Ld, /Lw - Control Library Selection

/link - Linker-Control Options

/nobool - Disable Bool Keyword

/nologo - Suppress Display of Sign-on Banner

/O1, /O2 - Specify Small or Fast Code

/Oa - Assume No Aliasing

/Obn - Control Inline Expansion

/Od - Disable Optimization

/Og - Enable Global Optimization

/Oi - Generate Intrinsic Functions

/Op, /Op - Improve Floating-Point Consistency

/Os, /O, /Ot - Optimize for Size or Speed

/Ow - Assume Aliasing Across Function Calls

/Ox - Use Maximum Optimization for Speed

/P - Create Preprocessor Output File

/TcFilename, /TC - Specify C Source File

/TpFilename, /TP - Specify C++ Source File

/UName, /u - Remove Predefined Names

/V - Set Version String

/vdn - Suppress or Enable Virtual Base Class

/vmb - Use Best Case for Pointers

/vmg - Use Full Generality for Pointers

/vmm - Declare Multiple Inheritance

/vms - Declare Single Inheritance

/vmv - Declare Virtual Inheritance

/W, /w - Set Warning Level

/X - Ignore Standard Include Directory

/Yc - Create Precompiled Header

/Yd - Duplicate Debugging Info

/Yu - Use Precompiled Header

/YX - Automate Precompiled Header

/Za - Disable Language Extensions

/Zd, /Z7, /Zi -Debug Info

/Ze - Enable Language Extensions

/Zg - Generate Function Prototypes

/Zl - Remove Default-Library Name from Object File

/Zm - Specify Memory Allocation Limit

/Zp - Pack Structure Members

/Zs - Check Syntax Only

See Also

Predefined Preprocessor Identifiers

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.