Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Closed Issue: Compile issues when including vld.h with some project settings [10533]

$
0
0
I tried to use vld with two public domain libraries, ICU and sqlite. In both cases including vld.h caused compile/build errors.

For ICU the /Za option (disable VC++ extensions) is turned on, which causes a bunch of errors when including windows.h. This was easy to get around using the __STDC__ macro defined when using /Za:
```
#ifdef __STDC__
#define CONST const
typedef int BOOL
...
#else
#include
#endif
```

For sqlite, the problem was that it is built with the C compiler, not C++, and the "wchar_t" data type used in vld_def.h didn't seem to be defined. So I just changed the function signature to accept an "unsigned short *" as the second argument instead of "wchar_t *" (which should be equivalent).

I think it should be possible to incorporate both of these changes without negatively impacting other projects.

In both cases, once I got past these minor issues VLD worked perfectly. Thanks!

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>