Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.65 KB

nxcompat-compatible-with-data-execution-prevention.md

File metadata and controls

43 lines (26 loc) · 1.65 KB
title description ms.date f1_keywords helpviewer_keywords
/NXCOMPAT (Compatible with Data Execution Prevention)
Describes the Microsoft C/C++ (MSVC) /NXCOMPAT linker option, which marks an executable as compatible with Data Execution Prevention (DEP).
09/19/2022
VC.Project.VCLinkerTool.DataExecutionPrevention
/NXCOMPAT
/NXCOMPAT linker option
-NXCOMPAT linker option
NXCOMPAT linker option

/NXCOMPAT (Compatible with Data Execution Prevention)

Indicates that an executable is compatible with the Windows Data Execution Prevention feature.

Syntax

/NXCOMPAT[:NO]

Remarks

By default, /NXCOMPAT is on.

/NXCOMPAT:NO can be used to explicitly specify an executable as incompatible with Data Execution Prevention.

For more information about Data Execution Prevention, see these articles:

To set this linker option in Visual Studio

  1. Open the Property Pages dialog box for the project. For more information, see Set compiler and build properties.

  2. Choose the Configuration Properties > Linker > Advanced property page.

  3. Modify the Data Execution Prevention (DEP) property. Choose OK or Apply to apply the change.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A.

See also

MSVC linker reference
MSVC linker options