I have a cargo.toml with the following:
[package]
name = “AboutDialog”
version = “0.1.0”
edition = “2021”[dependencies]
gtk4 = { path = “/usr/lib/x86_64-linux-gnu/pkgconfig”, version = “0.9.0”, features = [“v4_12”]}
You can see above that I am trying to let cargo
know where the gtk4.pc file is located.
The compiler error message is as follows:
error: failed to get
gtk4
as a dependency of packageAboutDialog v0.1.0 (/home/jim/JimData/Code/Rust_Github_Examples_v4/AboutDialog)
Caused by:
failed to load source for dependencygtk4
Caused by:
Unable to update /usr/lib/x86_64-linux-gnu/pkgconfigCaused by:
failed to read/usr/lib/x86_64-linux-gnu/pkgconfig/Cargo.toml
Caused by:
No such file or directory (os error 2)
There are many .pc files located here:
/usr/share/pkgconfig/
And the gtk4.pc is located here:
/usr/lib/x86_64-linux-gnu/pkgconfig/
I even tried moving a copy of the gtk4.pc file to the /usr/share/pkgconfig folder with no luck.
How do I let cargo know the location of the gtk4 file?