-
Notifications
You must be signed in to change notification settings - Fork 476
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
rust-sdl2 fails to compile with use-bindgen feature #961
Comments
Poking at this a bit, I think the existing bindgen files are out of date relative to what bindgen produces. I get a pretty large diff between the current |
There might be a new setting in bindgen that changes this behavior somehow. I'm not against modifying the sdl2-sys crate, but doing it only because of bindgen updated seems too little of an issue for such a breaking change. Remember that there are people that only depend on sdl2-sys. If there is no other way then sure, but surely there is an explanation why the old bindings looks like what we have now, compared the newer version you are trying to generate. |
I really only need the definition of the |
I am open to platform-specific definitions, but I don't really understand how it's linked to this issue? |
Maybe I’m doing something wrong running bindgen, rust-sdl2 itself doesn’t compile when it’s enabled, but pulling it in as a dependency with bindgen enabled it will compile 🤷♀️. I was just looking for an “easy” way to get the correct bindings generated for SDL_SysWMinfo. I’ll submit a PR with the changes to the struct. 👍 |
Same here on Arch Linux, using this as the dependency fails to compile with the very verbose errors.
|
I'm trying to add raw-window-handle #910 to rust-sdl2 which requires running bindgen to get the right bindings, but the build fails with a bunch of import errors in
pixels.rs
: https://gist.github.com/lmcgrath/8cc694479c63f8f6451b69eb08e6d7d8. The project builds fine without bindgen, so it looks like the references to the pixel format enum values needs to be updated (use sys::SDL_PixelFormatEnum::*
instead ofsys::*
). Would I be ok to fix this myself?The text was updated successfully, but these errors were encountered: