Link to home
Start Free TrialLog in
Avatar of goondoo27
goondoo27

asked on

VS2015 Redefinition errors

I'm updating my program from VS2010 to VS2015. Part of the update includes a new Windows SDK 8.1. I'm getting 100's of redefinition errors like those shown below:

1>c:\program files (x86)\windows kits\8.1\include\um\imagehlp.h(79): error C2011: '_LOADED_IMAGE': 'struct' type redefinition
1>  c:\program files (x86)\windows kits\8.1\include\um\dbghelp.h(76): note: see declaration of '_LOADED_IMAGE'
1>c:\program files (x86)\windows kits\8.1\include\um\imagehlp.h(648): error C2011: '_IMAGE_DEBUG_INFORMATION': 'struct' type redefinition
1>  c:\program files (x86)\windows kits\8.1\include\um\dbghelp.h(319): note: see declaration of '_IMAGE_DEBUG_INFORMATION'
1>c:\program files (x86)\windows kits\8.1\include\um\imagehlp.h(820): error C2011: '_MODLOAD_DATA': 'struct' type redefinition
1>  c:\program files (x86)\windows kits\8.1\include\um\dbghelp.h(491): note: see declaration of '_MODLOAD_DATA'
1>c:\program files (x86)\windows kits\8.1\include\um\imagehlp.h(828): error C2011: '_MODLOAD_CVMISC': 'struct' type redefinition
1>  c:\program files (x86)\windows kits\8.1\include\um\dbghelp.h(499): note: see declaration of '_MODLOAD_CVMISC'
1>c:\program files (x86)\windows kits\8.1\include\um\imagehlp.h(837): error C2011: '_MODLOAD_PDBGUID_PDBAGE': 'struct' type redefinition
1>  c:\program files (x86)\windows kits\8.1\include\um\dbghelp.h(508): note: see declaration of '_MODLOAD_PDBGUID_PDBAGE'


How can I fix this?
Avatar of Dennis Aries
Dennis Aries
Flag of Netherlands image

You will need to check your references/includes. You probably are including something that is already included by earlier or other references.

Dennis
SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of goondoo27
goondoo27

ASKER

Thank you all so much for replying to my question! As it turns out, I am using code from The Server Framework (JetByte) that includes the dbghelp.h file, while the Windows SDK v8.1 was including the imagehlp.h file. I ended up setting the imagehlp.h guard (#define _IMAGEHLP_) at the top of my include file and viola, it worked!