Closed jmmk closed 3 years ago
Thanks for pointing this out. I guess they should use feature flags for this because I wasn't aware of Linux specific features. Anyway, I hope this commit fixes the issue: https://github.com/AaronErhardt/relm4/commit/e568f312c9b0c9e8646a41a1e0b66ba6f67d3eba
I'll also release an updated version on crates.io soon.
@AaronErhardt that seems to work.
Is there an advantage to creating the linux
feature instead of using #[cfg(target_os = "linux")]
?
@jmmk I think in this case, probably no. I will change that use #[cfg(target_os = "linux")]
because gtk4-rs does it as well.
I've released a new version with the fix included
If you take a look at https://github.com/gtk-rs/gtk4-rs/blob/master/gtk4/Gir.toml, you will see some elements are generated with
cfg_condition = "target_os = \"linux\""
Those elements are:
These widgets are exported in https://github.com/AaronErhardt/relm4/blob/main/src/util/default_widgets.rs, which causes
relm4
compilation to fail on Windows (and likely other platforms, but I am running into this on Windows)