cargo doc fails, glib undeclared
makoConstruct opened this issue · 3 comments
This is for gstreamer = "0.16.7"
Documenting video_generation v0.1.0 (/home/mako/programming/video_generation)
error[E0433]: failed to resolve: use of undeclared type or module `glib`
--> src/main.rs:101:13
|
101 | source: glib::Error,
| ^^^^ use of undeclared type or module `glib`
error: Compilation failed, aborting rustdoc
error: aborting due to 2 previous errors
You need to add glib = "0.10"
to the dependencies in your Cargo.toml
if you want to use something from the glib
crate.
Ah, that's in my code, right, I see why I am confused. Sorry for not noticing that.
Explanation: I guess that since my purpose of running cargo doc was to generate documentation of the dependencies I kind of forgot that its usual purpose includes generating documentation of the project and so was confused when it was looking at my own code. I am aware that this is a really weird and annoying mental malfunction and, again, am sorry. I was also confused about where glib
was coming from in the code I'd received (the appsrc.rs example) and kinda wanted to complain about that, it it appears that glib was put into the gst::prelude at some point after the version I'm using.
Yeah it's re-exported by GStreamer now in the git version (which will become 0.17 soonish).
Also note that the proper location of the bindings is at https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/