Compartir a través de


/U, /u (Undefine Symbols)

 

The latest version of this topic can be found at -U, -u (Undefine Symbols).

The /U compiler option undefines the specified preprocessor symbol. The /u compiler option undefines the Microsoft-specific symbols that the compiler defines.

Syntax

/U[ ]symbol  
/u  

Arguments

symbol
The preprocessor symbol to undefine.

Remarks

Neither the /U or /u option can undefine a symbol created by using the #define directive.

The /U option can undefine a symbol that was previously defined by using the /D option.

By default, the compiler defines the following Microsoft-specific symbols.

Symbol Function
_CHAR_UNSIGNED Default char type is unsigned. Defined when the /J option is specified.
_CPPRTTI Defined for code compiled with the /GR option.
_CPPUNWIND Defined for code compiled with the /EHsc option.
_DLL Defined when the /MD option is specified.
_M_IX86 By default, defined to 600 for x86 targets.
_MSC_VER For more information, see Predefined Macros.
_WIN32 Defined for WIN32 applications. Always defined.
_MT Defined when the /MD or /MT option is specified.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Advanced property page.

  4. Modify the Undefine Preprocessor Definitions or Undefine All Preprocessor Definitions properties.

To set this compiler option programmatically

See Also

Compiler Options
Setting Compiler Options
/J (Default char Type Is unsigned)
/GR (Enable Run-Time Type Information)
/EH (Exception Handling Model)
/MD, /MT, /LD (Use Run-Time Library)