-
Notifications
You must be signed in to change notification settings - Fork 46
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
Conflict between GetObject() vs GetObject macro in the windows headers (wingdi.h) #134
Comments
I've created a fork with a fix. I just wait that the PR #133 is merged as I use it in my version |
I think the common solutions that other projects use are bad:
This is bad as this can break user code that relies on
This is also bad as the user has no way of actually using The best way would be temporarily undefining the macro with |
I tried here: I actually don't have a Windows machine here so it's a blind fix - hope it works! |
Is there anything that would block merging the PR? I think only the method applied can be discussed - it has pros and cons, but mostly it works in all cases, no need introducing alternative function or forcing users to undef the macro. |
Any news for the PR ? |
@andy3469 I am not able to reproduce the error. Please refer PR #141 and respective discussion is in #139 (comment) |
It's easy to reproduce the error. Compile minio-cpp with UNICODE and use it from an app that doesn't define UNICODE or vice versa. Basically now you have to ensure to compile minio-cpp and all code that depends on it having the same UNICODE definition (either defined or not), which is a little bit problematic if you are offering a library for others to consume. The problem is that if you include |
@kobalicek I was actually typing the same thing. When you add |
Here we continue to find errors with Windows.
The meaning of
GetObject
is redifined inside the windows header wingdi.hFor more context, I'm using the library with Qt on a desktop application so I can't remove this header.
Because of this define, the function GetObject is broken. I didn't check every function for now.
There was the same bug with rapidjson, you can check the issue here: Tencent/rapidjson#1448
The text was updated successfully, but these errors were encountered: