Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
Hi,
I'm trying to use MemLeakDetection program to trace the memory leaks in my application. The sample program I downloaded works very well but when I tried to incorportate the MemLeakDetection into my application I ran into numerous compilation errors.
I followed the instructions by adding the two header files and one C++ file into my application. My application compiled successfully with the new additions. But when I tried to use the leak detection feature by including MemLeakDetect.h in my main file I got over 100 comnpilation errors. The errors are all in ImageHlp.h and all have something to do with redefinitions. My application does not use ImageHlp.h. It's used by MemLeakDetection program. Most likely it's caused by something trivial but for the life of me I could not figure out what's happening. I simply add one line - #include "MemLeakDetect.h". Following are some of the error messages:
 
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\imagehlp.h(63) : error C2011: '_LOADED_IMAGE' : 'struct' type redefinition
1> c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(60) : see declaration of '_LOADED_IMAGE'
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\imagehlp.h(557) : error C2011: '_IMAGE_DEBUG_INFORMATION' : 'struct' type redefinition
1> c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(228) : see declaration of '_IMAGE_DEBUG_INFORMATION'
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\imagehlp.h(694) : error C2011: '_MODLOAD_DATA' : 'struct' type redefinition
1> c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(365) : see declaration of '_MODLOAD_DATA'
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\imagehlp.h(707) : error C2365: 'AddrMode1616' : redefinition; previous definition was 'enumerator'
1> c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(378) : see declaration of 'AddrMode1616'
 
Could someone please help?
 
Best Regards
Posted 25-Nov-12 16:17pm
sh625305

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It looks like you refer to this CodeProject article: Memory Leak Detection[^].
 
If so, why not asking David A. Jones your questions? Locate the section "Comments and Discussions" at the end of this page and use "Add a Comment or Question" to ask your question. The author will receive notification of your post and a chance to reply.
 
—SA
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 320
1 OriginalGriff 155
2 Peter Leow 115
3 Afzaal Ahmad Zeeshan 114
4 deepakdynamite 110
0 OriginalGriff 7,510
1 DamithSL 5,519
2 Sergey Alexandrovich Kryukov 4,994
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 25 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100