error: couldn't read `relm4\examples\simple.rs`: The system cannot find the path specified.
I'm on win10. using vcpkg I was able to build all the gtk4 deps just fine.
PS C:\w\rust\demos\Relm4> cargo run --example simple
Compiling relm4-icons v0.9.0
Compiling relm4 v0.9.1 (C:\w\rust\demos\Relm4\relm4)
error: couldn't read `relm4\examples\simple.rs`: The system cannot find the path specified. (os error 3)
Compiling relm4-components v0.9.1 (C:\working\rust\demos\Relm4\relm4-components)
error: couldn't read `relm4\examples\simple.rs`: The system cannot find the path specified. (os error 3)
error: could not compile `relm4` (example "simple") due to 1 previous error
PS C:\w\rust\demos\Relm4> cargo run --example alert
Compiling relm4-components v0.9.1 (C:\w\rust\demos\Relm4\relm4-components)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.87s
Running `target\debug\examples\alert.exe`
error: process didn't exit successfully: `target\debug\examples\alert.exe` (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)
PS C:\w\rust\demos\Relm4> cargo run --example tab_game --features=libadwaita
Compiling relm4-icons v0.9.0
Compiling relm4 v0.9.1 (C:\w\rust\demos\Relm4\relm4)
error: couldn't read `relm4\examples\tab_game.rs`: The system cannot find the path specified. (os error 3)
error: could not compile `relm4` (example "tab_game") due to 1 previous error
Aside this crazy resolution problem above, I am also seeing a few report
error[E0599]: the method `append` exists for reference `&FlowBox`, but its trait bounds were not satisfied
--> relm4\src\extensions\container.rs:31:26
|
31 | self.append(widget.as_ref());
| ^^^^^^ method cannot be called on `&FlowBox` due to unsatisfied trait bounds
...
74 | append_impl!(gtk::Box, gtk::ListBox, gtk::FlowBox);
| -------------------------------------------------- in this macro invocation
|
::: C:\Users\dhorner\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gtk4-0.9.1\src\auto\flow_box.rs:16:1
|
16 | / glib::wrapper! {
17 | | #[doc(alias = "GtkFlowBox")]
18 | | pub struct FlowBox(Object<ffi::GtkFlowBox>) @extends Widget, @implements Accessible, Buildable, Constrain...
... |
23 | | }
| |_- doesn't satisfy `FlowBox: IsA<MultiFilter>`, `FlowBox: IsA<gtk4::Box>`, `FlowBox: gtk4::prelude::BoxExt` or `FlowBox: gtk4::prelude::MultiFilterExt`
|
= note: the following trait bounds were not satisfied:
`FlowBox: IsA<gtk4::Box>`
which is required by `FlowBox: gtk4::prelude::BoxExt`
`FlowBox: IsA<MultiFilter>`
which is required by `FlowBox: gtk4::prelude::MultiFilterExt`
`&FlowBox: IsA<gtk4::Box>`
which is required by `&FlowBox: gtk4::prelude::BoxExt`
`&FlowBox: IsA<MultiFilter>`
which is required by `&FlowBox: gtk4::prelude::MultiFilterExt`
= note: this error originates in the macro `append_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
I tried cd into relm4 and running from there, that didnt help.
I tried using https://github.com/wingtk/gvsbuild c:\gtk and that leads to the following for every example.
error[E0599]: the method `append` exists for reference `&FlowBox`, but its trait bounds were not satisfied
--> relm4\src\extensions\container.rs:31:26
|
31 | self.append(widget.as_ref());
| ^^^^^^ method cannot be called on `&FlowBox` due to unsatisfied trait bounds
...
74 | append_impl!(gtk::Box, gtk::ListBox, gtk::FlowBox);
| -------------------------------------------------- in this macro invocation
I don't know. It's really strange. Are you sure you have a recent version of Rust properly installed on your system?
hmm. performed a rustup update same deal.
stable-x86_64-pc-windows-gnu unchanged - rustc 1.86.0 (05f9846f8 2025-03-31)
stable-x86_64-pc-windows-msvc unchanged - rustc 1.86.0 (05f9846f8 2025-03-31)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.88.0-nightly (d6c1e454a 2025-04-21)
1.81-x86_64-pc-windows-msvc unchanged - rustc 1.81.0 (eeb90cda1 2024-09-04)
I'm not sure what to do, so that append is not a problem and system related I guess?
Maybe do cargo clean and cargo update? The error is very strange and I don't think it is connected to Relm4, but rather your system.
I went and removed rustup and reinstalled; still happening. I had a junction setup that I was concerned might be the problem; thats gone now and the problem persists. I don't know, I will test this on my win11 machine and see if I have success there. Very strange. thank you for the responses.
clean and update both worked. so stange, moved the folder to another location, same deal, the path it says doesn't exist; exists.
C:\working\Relm4>cargo run --example toast --features="libadwaita gnome_43"
Compiling relm4-icons v0.9.0
Compiling relm4 v0.9.1 (C:\working\Relm4\relm4)
error: couldn't read `relm4\examples\toast.rs`: The system cannot find the path specified. (os error 3)
error: could not compile `relm4` (example "toast") due to 1 previous error
this is limited to Relm4, other projects build fine!
me too on window 11, AI told me that maybe its because path is too long, so I move project to home, no effect though