问题
I run setup file from Releases, and tried to follow official guide, but it has instructions for older versions only (Visual C++ 2010/2012/2013). I didn't find menus mentioned there. So how do I install vld on VS 2019?
回答1:
Suppose install path of VLD is C:\Program Files (x86)\Visual Leak Detector
Configure your project in order to use VLD when build Debug Win32:
- Open ProjectProperties
- Select Configuration: Debug, Platform: Win32
- Open Configuration PropertiesVC++ Directories
- Append Include Directories with
C:\Program Files (x86)\Visual Leak Detector\include
- Append Library Directories with
C:\Program Files (x86)\Visual Leak Detector\lib\Win32
In similar way, for Win64 you do:
- Open ProjectProperties
- Select Configuration: Debug, Platform: Win64
- Open Configuration PropertiesVC++ Directories
- Append Include Directories with
C:\Program Files (x86)\Visual Leak Detector\include
- Append Library Directories with
C:\Program Files (x86)\Visual Leak Detector\lib\Win64
For Release configuration actions are identical, just choose Release on step (2).
Congratulations, now you can use VLD, just
#include <vld.h>
来源:https://stackoverflow.com/questions/58439722/how-to-install-visual-leak-detector-on-visual-studio-2019