|
| Error compiling project with dbghelp.h...pls help |
 |
Mon, 14 Apr 2008 22:53:00 -070 |
I am using some source code written by someone else, which in turn includes
dbghelp.h
On scanning my PC , I did not find it, so I downloaded and installed the
latest version of Windows Debugging Tools (version 6.8) . Then I copied the
dbghelp.dll, dbhhelp.h and dbghelp.lib to my project folder. But on buliding
the project I am getting the following error:
c:\amoy\stacktrace\dbghelp.h(1747) : error C2061: syntax error : identifier
'__out_bcount_opt'
c:\amoy\stacktrace\dbghelp.h(2699) : error C2146: syntax error : missing ';'
before identifier 'ReqOffsets'
c:\amoy\stacktrace\dbghelp.h(2699) : error C2501: 'PULONG_PTR' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2699) : error C2501: 'ReqOffsets' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2701) : error C2146: syntax error : missing ';'
before identifier 'ReqStride'
c:\amoy\stacktrace\dbghelp.h(2701) : error C2501: 'ULONG_PTR' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2701) : error C2501: 'ReqStride' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2702) : error C2146: syntax error : missing ';'
before identifier 'BufferSize'
c:\amoy\stacktrace\dbghelp.h(2702) : error C2501: 'ULONG_PTR' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2702) : error C2501: 'BufferSize' : missing
storage-class or type specifiers
c:\amoy\stacktrace\dbghelp.h(2830) : error C2061: syntax error : identifier
'__in_bcount_opt'
c:\amoy\stacktrace\dbghelp.h(2842) : error C2061: syntax error : identifier
'__in_bcount_opt'
c:\amoy\stacktrace\dbghelp.h(2854) : error C2061: syntax error : identifier
'__in_bcount_opt
It seems like I am using the wrong version of dbghelp.h
I am using VC++6 in Windows XP. Can anyone please suggest a solution. Which
version would be appropiate for my system?
|
| Post Reply
|
| Re: Error compiling project with dbghelp.h...pls help |
 |
Tue, 15 Apr 2008 01:11:15 -070 |
On Apr 15, 6:53 am, amoy <a...@discussions.microsoft.com> wrote:
> I am using some source code written by someone else, which in turn
includes
> dbghelp.h
>
> On scanning my PC , I did not find it, so I downloaded and installed the
> latest version of Windows Debugging Tools (version 6.8) . Then I copied
the
> dbghelp.dll, dbhhelp.h and dbghelp.lib to my project folder. But on
buliding
> the project I am getting the following error:
>
> c:\amoy\stacktrace\dbghelp.h(1747) : error C2061: syntax error :
identifier
> '__out_bcount_opt'
The latest version of dbghelp.h requires specstrings.h and the
code added to cope with its absence is broken.
The fix is simple:- add this to dbghelp.h -- or -- to your own code
before you include it:
#ifndef __in_bcount_opt
#define __in_bcount_opt(x)
#endif
#ifndef __out_bcount_opt
#define __out_bcount_opt(x)
#endif
You may also get errors with VC6 about PULONG_PTR and ULONG_PTR, which
are
typedefs in the newer versions of Windows.h.
For VC6 you need:
typedef unsigned long ULONG_PTR;
typedef unsigned long *PULONG_PTR;
Alternatively get a more recent copy of the platform SDK and put it in
your include path.
Regards,
|
| Post Reply
|
|
|
|
|
|
|
|
|
|