Closed Refragg closed 1 year ago
Hi,
Very strange error. Please try using the latest version, straight from the repo:
[dependencies]
winsafe = { git = "https://github.com/rodrigocfd/winsafe", features = [] }
And see if you have any success.
Just tried it now, it is the exact same from the repository unfortunately.
Can you post the source code which is triggering this error, please?
Sure, it is in this repo and more specifically here https://github.com/Refragg/obs-livesplit-one/blob/88dd5c751e93db9e506fb2bc7ca959835112d5d7/src/lib.rs#L739-L747
This is very odd. You're calling CommandLineToArgv
, but the compilation error happens in GetWindowLong
, which is completely unrelated.
Could you test the following simple program, and see what happens?
fn main() {
match winsafe::CommandLineToArgv("a b c") {
Ok(a) => println!("{:?}", a),
Err(e) => println!("{:?}", e),
}
}
The same error appears at compile time with this simple example
In the end, it was just a minor syntax error: the handle method is called ptr()
, not as_ptr()
.
Let me know if this works.
Seems like it does fix it! Thank you for the quick fix!
Hello, I've been trying to use this library's CommandLineToArgvW and it seems like it builds correctly on all 64 bits architectures but it fails to build on i686-pc-windows both MSVC and GNU. Here's what I'm getting when running
cargo build --target i686-pc-windows-gnu
:Here's how it's imported in the project:
winsafe = { version = "0.0.17", features = ["shell"], default-features = false }
I'm down to provide more details if needed, hope you have a nice day.