Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

/GR (Enable Run-Time Type Information)

/GR

This option (/GR) adds code to check object types at run time. When this option is specified, the compiler defines the _CPPRTTI preprocessor macro. The option is cleared (/GR–) by default.

For more information on run-time type checking, see Run-Time Type Information in the C++ Language Reference.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Language property page.
  4. Modify the Enable Run-Time Type Info property.

To set this compiler option programmatically

See RuntimeTypeInfo Property.

See Also

Compiler Options | Setting Compiler Options

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.