1 out of 1 rated this helpful - Rate this topic

/NXCOMPAT (Compatible with Data Execution Prevention)

Indicates that an executable was tested to be compatible with the Windows Data Execution Prevention feature.

/NXCOMPAT[:NO]

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 project Property Pages dialog box. For details, see Modifying Project Settings.

  2. Click the Linker folder.

  3. Click the Command Line property page.

  4. Type the option in the Additional Options box.

To set this linker option programmatically

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
/NXCOMPAT setting is available in dropdown list in VS2008 and above
The article describes explicitly adding the /NXCOMPAT switch to the linker's command line, but it can also be set in the Project Properties Linker Advanced page as "Data Execution Prevention (DEP)" with settings "Image is compatible with DEP (/NXCOMPAT)" and "Image is not compatible with DEP (/NXCOMPAT:NO)".  The command line method is required for VS2005 with SP1.
Advertisement