-
Notifications
You must be signed in to change notification settings - Fork 742
MSVC C Integer constants are not supported #2600
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
I think none of us has a windows machine to test this so it will be difficult to track down, it could very well be that clang doesn't support this microsoft-specific syntax and if that's the case there's not much we can do as we only use what clang gives us. Maybe you could find a workaround using |
It might require activating MSVC-compatible mode in Clang: https://clang.llvm.org/docs/MSVCCompatibility.html |
If that's the case, bindgen passes all the arguments after |
After a little bit more digging the issue here seems to be that Even then, the workaround using |
It seems that parsing using
Rerunning again with trace, the full
|
@wmmc88 does this happens even if you pass the mvsc compatibility flags to clang via bindgen? |
@pvdrz yes. I passed in the compatibility flags like this:
|
hmmm... that's annoying. Bindgen is basically saying that it cannot find the type definition for that constant iiuc. My best bet is that you also need to include headers with the definition of |
hmm there doesnt seem to be a header with a definition of I also tried playing around with making
From those clang diag msgs, it seems that clang itself actually does recognize and can resolve |
Input C/C++ Header
Bindgen Invocation
Actual Results
generates empty file
Expected Results
It seems like the core issue here is that bindgen does not support msvc's integer constants. Removing the
UI64
suffix causes the correct generation. Unfortunately, I do not control the headers I am generating bindings too, so cannot just edit the header to use more standard integer literal declarations.The text was updated successfully, but these errors were encountered: