Closed MrMarnic closed 2 weeks ago
weirdly if you clone the repo and run with main.rs then it works, but if you add the repo cargo.toml with your own main.rs then get this error, maybe some versioning weirdness with windows 0.52 or 0.56 api ?
EDIT: when compiling from the cloned repo it uses windows-capture 1.2.0, but otherwise it uses windows-capture 1.3.6 (latest), there is a dependency issue here
EDIT2: If I remove Cargo.lock to have it regenerated after cloning then same error arises...
EDIT3: Confirmed it is an issue with windows-capture versioning, I will create a pull request to update to version 1.3.6 of windows-capture (it seems like a straight-foward issue, but let's see).
Just update the versions in your Cargo.toml file:
[target.'cfg(target_os = "windows")'.dependencies]
windows-capture = "1.3.6"
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_UI_HiDpi",
"Win32_UI_WindowsAndMessaging",
] }
EDIT: The versions need to change in a local copy of scap (cloned from github), at least until the pull request (#120) is merged
Thanks for the fast help. I think this guy had the same problem. https://github.com/CapSoftware/scap/issues/112
I still get the same error, even after changing the toml file.
[dependencies]
scap = {path="C:\\Users\\#####\\Documents\\RustProjects\\scap\\scap"}
[target.'cfg(target_os = "windows")'.dependencies]
windows-capture = "1.3.6"
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_UI_HiDpi",
"Win32_UI_WindowsAndMessaging",
] }
Is it correct?
sorry I meant for you to change the version in the local cargo.toml of scap (i.e. not the cargo.toml of your project), ill update the comment
Fixed by #120
I am trying to use this library, but I get this error: