Partager via


Compiler Options (Windows CE 5.0)

Send Feedback

The following table shows the compiler options available to all microprocessor compilers.

Option Description
/? Displays the available compiler options with descriptions.
/C - Preserve Comments During Preprocessing Preserves comments during preprocessing.
/c - Compile Without Linking Compiles without linking.
/callcap -Enable callcap profiling Inserts callcap profiling hooks at the beginning and end of each function.
/D - Define Constants and Macros Defines constants and macros.
/E - Copy Preprocessor Output Copies preprocessor output to standard output.
/EH - Exception Handling Model Specifies the model of exception handling. Includes alternatives /EHa, /EHc, and /EHs.
/EP - Copy Preprocessor Output Copies preprocessor output to standard output.
/F - Set Stack Size Sets stack size.
/Fa - Rename Assembly-File Listing Renames assembler file listing. For more information about setting file types, see File Alternatives.
/FA - Create Listing Files Creates assembler, machine, or source listing file. For more information about setting file types, see File Alternatives.
/fastcap - Enable fastcap profiling Inserts fastcap profiling hooks before and after each function call.
/Fd - Rename .PDB File Renames program database.
/Fe - Rename Executable File Renames executable file. For more information about setting file types, see File Alternatives.
/FI - Preprocess specified Header File First Preprocess specified header file first.
/Fm - Create Map File Creates map file. For more information about setting file types, see File Alternatives.
/Fo - Rename Object File Renames object file. For more information about setting file types, see File Alternatives.
/Fp - Specify Precompiled Header Specifies precompiled header file name. For more information about setting file types, see File Alternatives.
/FR, /Fr - Generate Browser Files Generates browser files. For more information about setting file types, see File Alternatives.
/GF - Enable Read-Only String Pooling Enables read-only string pooling.
/Gh - Enable _penter Hook Function Causes a call to the _penter function at the start of every method or function. Applies to x86 microprocessors only.
/GH - Enable _pexit Hook Function Causes a call to the _pexit function at the end of every method or function. Applies to x86 microprocessors only.
/GL - Enable Link-Time Code Generation Enables trans-module optimizations at link time.
/Gn - Optimize for Processor Optimizes code to favor a particular x86 processor, depending on the value of n.
/GR - Enable Run-Time Type Information Enables Run Time Type Information (RTTI).
/GS - Enable Security Checks Enables stack checking to detect buffer overrun attacks.

This is the default build flag for device compilers.

/GX - Enable Exception Handling Enables C++ exceptions.
/Gy - Enable Function-Level Linking Enables function-level linking.
/GZ - Catch Release Errors in Debug Build Enables run-time checks to catch bugs that only occur in a Release build while in a Debug build mode.
/H - Restrict Length of External Names Restricts length of external names.
/HELP - List the Compiler Options Lists the compiler options.
/I - Search Directory for Include Files Searches directory for include files.
/J - Change Default char Type Changes default character type.
/LD - Create a Dynamic-Link Library Creates a dynamic-link library. /LDd creates a debug DLL.
/link - Linker-Control Options Sets Linker-control options.
/nobool - Disable Bool Keyword Suppresses the C++ bool, true, and false keywords.
/nologo - Suppress Display of Sign-on Banner Suppresses display of sign-on banner.
/O1, /O2 - Specify Small or Fast Code Specifies small or fast code.
/Oa - Assume No Aliasing Assumes no aliasing.
/Obn - Control Inline Expansion Controls inline expansion, where n is a digit from 0 through 2.
/Od - Disable Optimization Disables optimization.
/Og - Enable Global Optimization Enables global optimization.
/Oi - Generate Intrinsic Functions Generates intrinsic functions.
/Op, /OP - Improve Floating-Point Consistency Improves floating-point consistency.
/Os, /O, /Ot - Optimize for Size or Speed Specifies small or fast sequences of machine code.
/Ow - Assume Aliasing Across Function Calls Assumes aliasing across function calls.
/Ox - Use Maximum Optimization for Speed Uses maximum optimization for fast code.
/P - Create Preprocessor Output File Creates preprocessor-output file.
/QIfist - Suppress _ftol Suppresses the call of the _ftol function when a conversion from floating-point type to integer type is required.

Applies to x86 microprocessors only.

/RTC - Run-time Error Checks Enables run-time error checks.

Applies to x86 microprocessors only.

/showIncludes - List Include Files Causes a list of include files to be output.
/TcFilename, /TC - Specify C Source File /TcFilename compiles Filename as a C source file.

/TC compiles all files as C source files.

/TpFilename, /TP - Specify C++ Source File /TpFilename compiles Filename as a C++ source file.

/TP compiles all files as C++ source files.

/UName, /u - Remove Predefined Names /UName removes predefined macro.

/u removes all predefined macros.

/vdn - Suppress or Enable Virtual Base Class Suppresses or enables hidden vtordisp class members.
/vmb - Use Best Case for Pointers Uses best case for pointers to class members.
/vmg - Use Full Generality for Pointers Uses full generality for pointers to class members.
/vmm - Declare Multiple Inheritance Declares multiple inheritances.
/vms - Declare Single Inheritance Declares single inheritance.
/vmv - Declare Virtual Inheritance Declares virtual inheritance.
/V - Set Version String Sets version string.
/W, /w - Set Warning Level /Wn sets warning level to n, default is 1.

/WX treats warnings as errors.

/w disables all warnings.

/WL - Enable One-line Diagnostics Enables additional information about error and warming messages
/Wp64 - Detect 64-bit Portability Issues Detects 64-bit portability problems on _w64 types.
/X - Ignore Standard Include Directory Ignores standard include directory.
/Y- -- Ignore Precompiled Header Options Causes all other /Y precompiled header options to be ignored. This option cannot be overridden.
/Yc - Create Precompiled Header Creates precompiled header.
/Yd - Duplicate Debugging Info Duplicates debugging information in all object files.
/Yu - Use Precompiled Header Uses precompiled header.
/YX - Automate Precompiled Header Automates precompiled header.
/Za - Disable Language Extensions Disables Microsoft C++ extensions and compile for ANSI compatibility.
/Zc:forScope - Force Conformance in For Loop Scope Causes standard C++ behavior to occur in for loops with Microsoft extensions with the /Ze - Enable Language Extensions option.
/Zc:wchar_t - wchar_t Is Native Type Causes the type wchar_t to become a native type that maps to __wchar_t in the same way that short maps to __int16.
/Zd, /Z7, /Zi -Debug Info Generates debugging information.
/Ze - Enable Language Extensions Enables Microsoft C++ language extensions.
/Zg - Generate Function Prototypes Generates function prototypes.
/Zl - Remove Default-Library Name from Object File Removes default-library names from object file.
/Zm - Specify Memory Allocation Limit Determines the compiler memory allocation limit.
/Zp - Pack Structure Members Packs structure members on byte boundary specified by n.
/Zs - Check Syntax Only Checks syntax only.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.