raymanfx / libv4l-rs

Video4Linux2 bindings for Rust
MIT License
152 stars 65 forks source link

Unhelpful error message when compiling with default features off #94

Open vi opened 8 months ago

vi commented 8 months ago

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)

raymanfx commented 8 months ago

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