mio-serial icon indicating copy to clipboard operation
mio-serial copied to clipboard

Can't compile as dependency to another project

Open Masterzach32 opened this issue 3 years ago • 5 comments

I'm getting this error when trying to compile a project that uses mio-serial as a dependency. However, I can clone this repo and build successfully. Any ideas on what to try?

error[E0308]: mismatched types
   --> C:\Users\zachkozar\.cargo\registry\src\github.com-1ecc6299db9ec823\mio-serial-5.0.2\src\lib.rs:822:42
    |
822 |         let r = unsafe { SetCommTimeouts(handle, &mut timeouts) };
    |                                          ^^^^^^ expected enum `winapi::ctypes::c_void`, found enum `std::ffi::c_void`
    |
    = note: expected raw pointer `*mut winapi::ctypes::c_void`
               found raw pointer `*mut std::ffi::c_void`

Masterzach32 avatar Aug 09 '22 22:08 Masterzach32

I have the same issue I'm currently pining the version to exactly 5.0.2 in the Cargo.toml file like so:

mio-serial = "=5.0.1"

and this seems to work just fine.

wischi-chr avatar Sep 21 '22 18:09 wischi-chr

mio-serial 5.0.2 need winapi crate's std feature.

expected enum `winapi::ctypes::c_void`, found enum `std::ffi::c_void`

imxood avatar Oct 26 '22 16:10 imxood

Current master (6d65070ac02af8bad275c87221e6c292fb1a7156) fixes the problem for us. Can you @estokes therefore create a new mio-serial release, please?

Apart from that, when the root Cargo.toml file contains winapi-util the build on windows systems with mio-serial 5.0.3 works too.

g0hl1n avatar Jan 12 '23 09:01 g0hl1n

Released 5.0.4

estokes avatar Jan 12 '23 17:01 estokes

Thank you very much for your quick response!

Would you mind creating git tags for the releases 5.0.2 to 5.0.4?

g0hl1n avatar Jan 13 '23 07:01 g0hl1n