-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building on MinGW: default WINVER
is too old
#1681
Conversation
This is missing some words. |
These are some lines of winnls.h
The update code below will work correctly!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not an appropriate fix, it's a hack. we need to understand why the definition is not available given what we expect. is the windows version wrong? what platform is the error seen on? our windows CI bots don't have this issue so there's a difference somewhere.
So in other words https://en.wikipedia.org/wiki/Windows_Vista says:
Do we want to support building on completely EOL system? |
I building it on Microsoft Windows 11 Home Edition 10.0.22621. |
Ok, so mingw defaults to some lower baseline winver. #ifdef BENCHMARK_OS_WINDOWS
+#if !defined(WINVER) || WINVER < 0x0600
+#undef WINVER
+#define WINVER 0x0600
+#endif // WINVER handling
#include <shlwapi.h>
#undef StrCat // Don't let StrCat in string_util.h be renamed to lstrcatA
#include <versionhelpers.h>
#include <windows.h> |
WINVER
is too old
@zm1060 thank you! |
When building leveldb, add_test(NAME "leveldb_tests" COMMAND "leveldb_tests").