rexiv2
rexiv2 copied to clipboard
Unable to build project on Windows
Hi, I’m currently trying to get one of my projects to build on windows (using a GitHub action on a windows-latest runner, so the environment should be easily reproducible) and ran into a problem regarding the libraries usage of some unix-specific functionality (see following error messages).
(This is my first GitHub issue ever, so I am sorry if I missed something critical and I’ll be happy to provide you with any further information required to solve this bug.)
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\runneradmin\.cargo\registry\src\…\rexiv2-0.9.1\src\lib.rs:47:14
|
47 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find `unix` in `os`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\runneradmin\.cargo\registry\src\…\rexiv2-0.9.1\src\lib.rs:279:58
|
279 | let c_str_path = ffi::CString::new(path.as_ref().as_bytes()).unwrap();
| ^^^^^^^^ method not found in `&OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\runneradmin\.cargo\registry\src\…\src\lib.rs:327:58
|
327 | let c_str_path = ffi::CString::new(path.as_ref().as_bytes()).unwrap();
| ^^^^^^^^ method not found in `&OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\runneradmin\.cargo\registry\src\…\src\lib.rs:734:58
|
734 | let c_str_path = ffi::CString::new(path.as_ref().as_bytes()).unwrap();
| ^^^^^^^^ method not found in `&OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\runneradmin\.cargo\registry\src\…\rexiv2-0.9.1\src\lib.rs:888:58
|
888 | let c_str_path = ffi::CString::new(path.as_ref().as_bytes()).unwrap();
| ^^^^^^^^ method not found in `&OsStr`
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `rexiv2` due to 5 previous errors