-
Notifications
You must be signed in to change notification settings - Fork 494
Closed
Description
The dependence on DbgHelp.h introduced in #5144 causes warnings that prevent compilation using older Windows SDK versions. Some versions (8.1 and earlier known) trigger warning C4091 in the header, leading to a failed build.
There are a few ways of handling this problem:
- Ignore the warning using
#pragma warning(push)
#pragma warning(disable:4091)
#include <DbgHelp.h>
#pragma warning(pop)- Setting an SDK version dependency of 10+, which may break compatibility with older versions of Windows. Cmake provides ways of configuring this if desirable.
Relevant discussion: https://discordapp.com/channels/793331351645323264/1046628873397358602/1322529161407102987
Error:
73>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(1544,2): error C2220: the following warning is treated as an error (compiling source file C:\Users\Ryan\dfhack\library\MiscUtils.cpp)
73>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(1544,2): warning C4091: 'typedef ': ignored on left of '<unnamed-enum-hdBase>' when no variable is declared (compiling source file C:\Users\Ryan\dfhack\library\MiscUtils.cpp)
73>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(3190,2): warning C4091: 'typedef ': ignored on left of '<unnamed-enum-sfImage>' when no variable is declared (compiling source file C:\Users\Ryan\dfhack\library\MiscUtils.cpp)
Metadata
Metadata
Assignees
Labels
No labels