libv4l-rs icon indicating copy to clipboard operation
libv4l-rs copied to clipboard

Unhelpful error message when compiling with default features off

Open vi opened this issue 1 year ago • 1 comments

If v4l crate expects user to enable either libv4l or v4l2 features then there should probably be some #[cfg(...)] comile_error!() stating this if none or both of the features are enabled.

Now I get something like:

error[E0432]: unresolved import `crate::v4l_sys`
 --> /home/vi/.cargo/registry/src/-3d9d141e372ea94e/v4l-0.14.0/src/v4l2/videodev.rs:1:12
  |
1 | use crate::v4l_sys::v4l2_ext_control;
  |            ^^^^^^^ could not find `v4l_sys` in the crate root

(many similar compiler errors)

vi avatar Feb 13 '24 16:02 vi

Yes, that sounds like a great idea. Could you open a pull request with the change?

raymanfx avatar Feb 18 '24 13:02 raymanfx