-
Notifications
You must be signed in to change notification settings - Fork 742
Both _WIN32 and _WIN64 are defined when targeting 32-bit windows from 64-bit windows #1062
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
Comments
Thanks for the bug report! I'm not really familiar with windows development, but to be clear, only one of either |
32 here is supposed to be the opposite to 16, not 64. |
Does that mean that this issue can be closed as exhibiting expected behavior? |
Ah good to know. |
To make sure I understand: the remaining issue is that when invoking |
No. |
Thanks for the clarification! |
If I had to guess, I'd say it's related to rust-lang/rust#42587 |
Update: |
Ok I used git bisect to find the commit that solved it and it's 26da344 Only need to publish a new version. |
We'll publish a new version after merging #1042 |
I tried to investigate #541 and found out that both _WIN32 and _WIN64 are defined. I could see how it makes many troubles, and perhaps related to that issue .
It won't happen if the command has the
--target=i686-pc-windows-msvc
flag, but it does happen if it has the--target=x86_64-pc-windows-msvc
flag.It also happens when I use bindgen through build.rs script (this way it happens on both
cargo run --target=i686-pc-windows-msvc
andcargo run --target=x86_64-pc-windows-msvc
).Input C/C++ Header
Bindgen Invocation
bindgen.exe example.h
Actual Results
Expected Results
// when
--target=i686-pc-windows-msvc
// when
--target=x86_64-pc-windows-msvc
The text was updated successfully, but these errors were encountered: