แก้ไข

แชร์ผ่าน


/INFERASANLIBS (Use inferred sanitizer libs)

Use the /INFERASANLIBS linker option to enable or disable linking to the default AddressSanitizer libraries. As of Visual Studio 2019 16.9, the only supported sanitizer is AddressSanitizer.

Syntax

/INFERASANLIBS[:NO]

Remarks

The /INFERASANLIBS linker option enables the default AddressSanitizer libraries. This option is enabled by default.

The /INFERASANLIBS and /INFERASANLIBS:NO linker options offer support for advanced users. For more information, see AddressSanitizer build and language reference.

The /INFERASANLIBS option is available beginning in Visual Studio 2019 version 16.9.

To set the /INFERASANLIBS linker option in the Visual Studio development environment

  1. Open your project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > Command Line property page.

  3. Modify the Additional Options property. To enable default libraries, enter /INFERASANLIBS in the edit box. To disable default libraries, enter /INFERASANLIBS:NO instead.

  4. Choose OK or Apply to save your changes.

To set this linker option programmatically

See also

MSVC linker reference
MSVC linker options
/fsanitize (Enable sanitizers)
AddressSanitizer overview
AddressSanitizer known issues
AddressSanitizer build and language reference