-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fixed a GetObject() function colliding with WinAPI macro #139
Conversation
50a5f6a
to
16235d2
Compare
16235d2
to
993ace9
Compare
@balamurugana Ping :) |
I am trying to reproduce the error with Github CI by PR #141. If I include |
The failure doesn't seem to be caused by minio-cpp at all. I'm not a windows expert, but I think that since |
PTAL @balamurugana |
@harshavardhana We need a working reproducer of the issue. Please refer #141 |
That's a bad reproducer - create a fresh project and include <wingdi.h> and you will see the same failure. The change is actually solid - it creates the right symbol (without A or W suffix) and then offers inlines in case <windows.h> was included. But it's transparent for users. |
@kobalicek Could you add below test case for this PR? diff --git a/tests/tests.cc b/tests/tests.cc
index e06e1b3..866de1c 100644
--- a/tests/tests.cc
+++ b/tests/tests.cc
@@ -15,6 +15,11 @@
//
// SPDX-License-Identifier: Apache-2.0
+#ifdef _WIN32
+#define UNICODE
+#include <windows.h> // To Test https://github.com/minio/minio-cpp/issues/134
+#endif
+
#include <miniocpp/args.h>
#include <miniocpp/client.h>
#include <miniocpp/http.h> |
is this added ? PTAL @kobalicek |
@kobalicek ^^ PTAL in-case you missed. |
Just for posterity, this is how I include "windows" in my app #include <SDKDDKVer.h> #define WIN32_LEAN_AND_MEAN #include <windows.h> |
Fixes #134