| title | -GX (Enable Exception Handling) | Microsoft Docs | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||
| ms.date | 11/04/2016 | |||||||||
| ms.reviewer | ||||||||||
| ms.suite | ||||||||||
| ms.technology |
|
|||||||||
| ms.tgt_pltfrm | ||||||||||
| ms.topic | article | |||||||||
| f1_keywords |
|
|||||||||
| dev_langs |
|
|||||||||
| helpviewer_keywords |
|
|||||||||
| ms.assetid | 933b43ba-de77-4ff8-a48b-7074de90bc1c | |||||||||
| caps.latest.revision | 16 | |||||||||
| author | corob-msft | |||||||||
| ms.author | corob | |||||||||
| manager | ghogen | |||||||||
| translation.priority.ht |
|
|||||||||
| translation.priority.mt |
|
Deprecated. Enables synchronous exception handling using the assumption that functions declared by using extern "C" never throw an exception.
/GX
/GX is deprecated. Use the equivalent /EHsc option instead. For a list of deprecated compiler options, see the Deprecated and Removed Compiler Options section in Compiler Options Listed by Category.
By default, /EHsc, the equivalent of /GX, is in effect when you compile by using the Visual Studio development environment. When using the command line tools, no exception handling is specified. This is the equivalent of /GX-.
For more information, see C++ Exception Handling.
-
Open the project's Property Pages dialog box. For details, see Working with Project Properties.
-
In the navigation pane, choose Configuration Properties, C/C++, Command Line.
-
Type the compiler option in the Additional Options box.
- See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.
Compiler Options
Setting Compiler Options
/EH (Exception Handling Model)