nokhwa icon indicating copy to clipboard operation
nokhwa copied to clipboard

Cannot compile on Windows in any version

Open Julien-cpsn opened this issue 1 year ago • 2 comments

Hello, I tried de compile the library from version 0.10.0 to 0.10.4 but nothing worked out. I am using cargo 1.70.0, rustup 1.26.0 and rustc 1.70.0 on Windows 11 22621.1848. I am also using tauri but it does not change the fact that compilation doesn't work.

Here are the two errors : image

I did use the suggestions from cargo and now its working like a charm!

From: https://github.com/l1npengtul/nokhwa/blob/cab61c5750085df9ebb812269caf05f48d14b51d/nokhwa-core/src/traits.rs#L226 https://github.com/l1npengtul/nokhwa/blob/cab61c5750085df9ebb812269caf05f48d14b51d/nokhwa-core/src/traits.rs#L227

To:

bytes_per_row: Some(width_nonzero),
rows_per_image: Some(height_nonzero),

Have a great day

Julien-cpsn avatar Jun 25 '23 19:06 Julien-cpsn

Same thing on Mac OS 13

jilchab avatar Jul 13 '23 15:07 jilchab

I'm also experiencing this issue, and I can confirm that this fix does work.

LunaticWyrm467 avatar Aug 21 '23 18:08 LunaticWyrm467