This project has moved and is read-only. For the latest updates, please go here.

Issues with recent code changes (post Aug 24th)

Aug 31, 2010 at 8:24 PM

I've been really pleased at how well vld has worked and tried updating to the latest available in version control. Unfortunately the recent code changes do not build when vld.h is compiled as C rather than C++ due to the use of C++ only features in the header which are not avoided with defines. Also it requires windows.h or afxwin.h to be included prior to compilation. If a project uses neither of these or is not structured to included them at that point, compilation will fail. I'm not sure on the best way to fix this issue for a wide audience, personally I did the following:


@@ -112,6 +112,7 @@ __declspec(dllimport) void VLDReportLeaks ();
 __declspec(dllimport) void VLDRefreshModules();
+#ifdef HMODULE
 // VLDEnableModule - Enable Memory leak checking on the specified module.
@@ -143,7 +144,13 @@ __declspec(dllimport) void VLDDisableModule(HMODULE);
 //    None.
+#ifdef __cplusplus
 __declspec(dllimport) void VLDSetReportOptions(UINT32 option_mask, WCHAR *filename = NULL);
+__declspec(dllimport) void VLDSetReportOptions(UINT32 option_mask, WCHAR *filename);
 #ifdef __cplusplus


However, there's also an issue with release builds as the inline keyword is used in vld.h, but I avoid including vld.h completely when not building debug builds in my projects.




Sep 1, 2010 at 1:41 AM

Indeed my bad.

I am going to submit a new Patch fixing that to KindDragon as soon as possible.

I hope that it will be before this week-end but I can't promise anything.