gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.89k stars 174 forks source link

Book: Issue with glib::spawn_future_local in gtk-rs Chapter 6 #1798

Closed azurekite83 closed 4 months ago

azurekite83 commented 4 months ago
When using glib::spawn_future_local with clone macro from Chapter 6 in gtk-rs, compiler spits out error stating: ` error: Unexpected token [weak] --> src/main.rs:53:10 53 #[weak]

`

sdroege commented 4 months ago

Which version of gtk4-rs are you using? This sounds like you're using 0.8 (glib-rs 0.19) and not 0.9 (glib-rs 0.20). The #[weak] syntax is new in that release.

azurekite83 commented 4 months ago

You're right. I'm using MSYS2 and built gtk4 differently so I've been trying to cargo update instead of updating from MSYS2. I appreciate it.

azurekite83 commented 4 months ago

Just tried updating with MSYS2. No updates for gtk happened, tried uninstalling and building using gvsbuild but gvsbuild is installing 0.8 still. Is 0.9 going to be built from scratch until gvsbuild is updated?

sdroege commented 4 months ago

gvsbuild has nothing to do with gtk-rs updates, that's all handled by cargo. Check that you have version 0.9 in your Cargo.toml.

azurekite83 commented 4 months ago

Oh ok, thank you.