Closed 7stud closed 1 year ago
If you run gtk4-demo
it will probably fail the same way? This looks like a setup problem on your side. You seemed to have compiled GTK4 with the X11 backend but don't run an X11 server on your machine.
If you're using macOS it would be better to use the macOS backend.
If you run
gtk4-demo
it will probably fail the same way? This looks like a setup problem on your side. You seemed to have compiled GTK4 with the X11 backend but don't run an X11 server on your machine.If you're using macOS it would be better to use the macOS backend.
I followed the install instructions, except I installed GTK with MacPorts instead of Homebrew. I guess I'll try QT instead.
Why did you use MacPorts instead of Homebrew though? Apparently MacPorts is using the X11 backend of GTK, while Homebrew would use the proper macOS backend. There's a reason why the install instructions mention Homebrew :)
I'm following the Hello World tutorial here:
https://gtk-rs.org/gtk4-rs/stable/latest/book/hello_world.html
But no window is displayed when I do
cargo run
--instead I get these warnings:Here's my
main.rs
:I installed gtk4 with MacPorts (instead of Homebrew ):
I checked the version:
Then I created a new app:
Then:
My Cargo.toml:
cargo run
worked fine before I added any of the gtk code: