You may encounter problems when including stublib.h in order to link directly with Memory Validator.
Include path problems
Ensure that your project C preprocessor include paths reference both of the stub and stublib subdirectories in the installation directory of Memory Validator.
For example, if Memory Validator is installed in:
C:\Program Files (x86)\Software Verify\C++ Memory Validator
Then add the following paths for all configurations; Debug, Release, etc:
C:\Program Files (x86)\Software Verify\C++ Memory Validator\stub C:\Program Files (x86)\Software Verify\C++ Memory Validator\stublib
Compiler errors
If you include stublib.h, your project must have included windows.h first, (or see below for an alternative).
If you fail to include windows.h then stublib.h will refer to some none-existent datatypes, causing compiler errors similar to the ones shown below.
Here's an example program that will not compile:
#include "stdafx.h"
To fix this problem simply include windows.h before stublib.h
#include "stdafx.h"
If including windows.h is not an option, you can just define the following types:
#define LONG long |
You may find that you can't use svlMVStubService.lib / svlMVStubService_x64.lib because your linker doesn't understand the format of the lib file.
If that happens you can use the code below to compile the two functions that would be provided by those libraries.
|