Skip to content
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

Cargo doesn't know about the raw-window-handle feature #979

Closed
OneSadCookie opened this issue Apr 2, 2020 · 5 comments
Closed

Cargo doesn't know about the raw-window-handle feature #979

OneSadCookie opened this issue Apr 2, 2020 · 5 comments

Comments

@OneSadCookie
Copy link

OneSadCookie commented Apr 2, 2020

So I can't use it with 0.33:

Cargo.toml snippet:

[dependencies.sdl2]
version = "~0.33.0"
default-features = false
features = ["bundled", "static-link", "raw-window-handle"]

Error:

failed to select a version for `sdl2`.
    ... required by package `XXX v0.1.0 (/path/redacted)`
versions that meet the requirements `~0.33.0` are: 0.33.0

the package `XXX` depends on `sdl2`, with features: `raw-window-handle` but `sdl2` does not have these features.

(It works fine if I use the git version)

Maybe this is because your Cargo.toml doesn't list raw-window-handle as a feature?

@Cobrand
Copy link
Member

Cobrand commented Apr 3, 2020

That's because 0.33.0 was released before the raw-window-handle feature was merged. I'll create a 0.33.1 at some point (hopefully soon), but in the meantime please use the git version.

@OneSadCookie
Copy link
Author

Thanks; I was confused I guess by the line in the changelog under "v0.33" which says

PR #962: Added raw-window-handle support for Windows, Linux (X11 and Wayland) and macOS.

@chapel
Copy link

chapel commented Apr 8, 2020

@Cobrand it isn't just that it was merged after 0.33.0 but also because the feature was removed completely from the Cargo.toml file. Also when adding the new feature name "raw-window-handle" as defined in lib.rs it looks like that isn't supported because it conflicts with the module name. The git version does not work for this feature sadly.

@Cobrand
Copy link
Member

Cobrand commented Apr 8, 2020

@chapel it works for me, might be an OS-related problem, or a configuration problem but I can't see what.

Clone this repository, make sure you use the master version, and run cargo run --features raw-window-handle --example raw-window-handle-with-wgpu, does it compile and run properly?

This cargo command works perfectly fine on my linux for reference.

@chapel
Copy link

chapel commented Apr 8, 2020

Hmm, I guess you're right, tbh I'm not sure why it wasn't working correctly before but it is likely something I didn't understand. Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants