Export (0) Print
Expand All

Compiler Options (Windows CE 5.0)

Windows CE 5.0
Send Feedback

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

OptionDescription
/?Displays the available compiler options with descriptions.
/C - Preserve Comments During PreprocessingPreserves comments during preprocessing.
/c - Compile Without Linking Compiles without linking.
/callcap -Enable callcap profilingInserts 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 ModelSpecifies 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 FilesCreates assembler, machine, or source listing file. For more information about setting file types, see File Alternatives.
/fastcap - Enable fastcap profilingInserts fastcap profiling hooks before and after each function call.
/Fd - Rename .PDB FileRenames program database.
/Fe - Rename Executable FileRenames executable file. For more information about setting file types, see File Alternatives.
/FI - Preprocess specified Header File FirstPreprocess specified header file first.
/Fm - Create Map FileCreates map file. For more information about setting file types, see File Alternatives.
/Fo - Rename Object FileRenames object file. For more information about setting file types, see File Alternatives.
/Fp - Specify Precompiled HeaderSpecifies precompiled header file name. For more information about setting file types, see File Alternatives.
/FR, /Fr - Generate Browser FilesGenerates browser files. For more information about setting file types, see File Alternatives.
/GF - Enable Read-Only String PoolingEnables read-only string pooling.
/Gh - Enable _penter Hook FunctionCauses a call to the _penter function at the start of every method or function. Applies to x86 microprocessors only.
/GH - Enable _pexit Hook FunctionCauses a call to the _pexit function at the end of every method or function. Applies to x86 microprocessors only.
/GL - Enable Link-Time Code GenerationEnables trans-module optimizations at link time.
/Gn - Optimize for ProcessorOptimizes code to favor a particular x86 processor, depending on the value of n.
/GR - Enable Run-Time Type InformationEnables Run Time Type Information (RTTI).
/GS - Enable Security ChecksEnables stack checking to detect buffer overrun attacks.

This is the default build flag for device compilers.

/GX - Enable Exception HandlingEnables C++ exceptions.
/Gy - Enable Function-Level LinkingEnables function-level linking.
/GZ - Catch Release Errors in Debug BuildEnables run-time checks to catch bugs that only occur in a Release build while in a Debug build mode.
/H - Restrict Length of External NamesRestricts length of external names.
/HELP - List the Compiler OptionsLists the compiler options.
/I - Search Directory for Include FilesSearches directory for include files.
/J - Change Default char TypeChanges default character type.
/LD - Create a Dynamic-Link LibraryCreates a dynamic-link library. /LDd creates a debug DLL.
/link - Linker-Control OptionsSets Linker-control options.
/nobool - Disable Bool KeywordSuppresses the C++ bool, true, and false keywords.
/nologo - Suppress Display of Sign-on BannerSuppresses display of sign-on banner.
/O1, /O2 - Specify Small or Fast CodeSpecifies small or fast code.
/Oa - Assume No AliasingAssumes no aliasing.
/Obn - Control Inline ExpansionControls inline expansion, where n is a digit from 0 through 2.
/Od - Disable OptimizationDisables optimization.
/Og - Enable Global OptimizationEnables global optimization.
/Oi - Generate Intrinsic FunctionsGenerates intrinsic functions.
/Op, /OP - Improve Floating-Point ConsistencyImproves floating-point consistency.
/Os, /O, /Ot - Optimize for Size or SpeedSpecifies small or fast sequences of machine code.
/Ow - Assume Aliasing Across Function CallsAssumes aliasing across function calls.
/Ox - Use Maximum Optimization for SpeedUses maximum optimization for fast code.
/P - Create Preprocessor Output FileCreates preprocessor-output file.
/QIfist - Suppress _ftolSuppresses 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 ChecksEnables run-time error checks.

Applies to x86 microprocessors only.

/showIncludes - List Include FilesCauses 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 ClassSuppresses or enables hidden vtordisp class members.
/vmb - Use Best Case for PointersUses best case for pointers to class members.
/vmg - Use Full Generality for PointersUses full generality for pointers to class members.
/vmm - Declare Multiple InheritanceDeclares multiple inheritances.
/vms - Declare Single InheritanceDeclares single inheritance.
/vmv - Declare Virtual InheritanceDeclares virtual inheritance.
/V - Set Version StringSets 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 DiagnosticsEnables additional information about error and warming messages
/Wp64 - Detect 64-bit Portability IssuesDetects 64-bit portability problems on _w64 types.
/X - Ignore Standard Include DirectoryIgnores standard include directory.
/Y- -- Ignore Precompiled Header OptionsCauses all other /Y precompiled header options to be ignored. This option cannot be overridden.
/Yc - Create Precompiled HeaderCreates precompiled header.
/Yd - Duplicate Debugging InfoDuplicates debugging information in all object files.
/Yu - Use Precompiled HeaderUses precompiled header.
/YX - Automate Precompiled HeaderAutomates precompiled header.
/Za - Disable Language ExtensionsDisables Microsoft C++ extensions and compile for ANSI compatibility.
/Zc:forScope - Force Conformance in For Loop ScopeCauses 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 TypeCauses 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 InfoGenerates debugging information.
/Ze - Enable Language ExtensionsEnables Microsoft C++ language extensions.
/Zg - Generate Function PrototypesGenerates function prototypes.
/Zl - Remove Default-Library Name from Object FileRemoves default-library names from object file.
/Zm - Specify Memory Allocation LimitDetermines the compiler memory allocation limit.
/Zp - Pack Structure MembersPacks structure members on byte boundary specified by n.
/Zs - Check Syntax OnlyChecks syntax only.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft