[英]Cargo fails to compile rust-qml on Windows 10
我想在Windows 10上使用Rust制作GUI应用程序,发现qml板条箱看起来不错。
我在Cargo.toml
文件中添加了此依赖项: Cargo.toml
qml = "0.0.9"
,但是当我运行cargo build
,出现此错误:
> cargo build
Compiling qml v0.0.9
error: failed to run custom build command for `qml v0.0.9`
process didn't exit successfully: `project\target\debug\build\qml-018515e4bf91189d\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'failed to execute process: The specified file cannot be found. (os error 2)', user\.cargo\registry\src\github.com-1ecc6299db9ec823\qml-0.0.9\build.rs:28:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
我查看了build.rs
文件,看到以下行:
fs::copy(Path::new(&manifest_dir).join("build_lib.sh"), Path::new(&out_dir).join("build_lib.sh")).unwrap();
也许我无权在我的帐户上执行此操作,所以我尝试以admin身份运行它,但是cargo和rustc安装在我的用户文件夹中。
更改路径时,出现error: no default toolchain configured
。
似乎在80ccad26中添加了对Windows的支持,似乎尚未发布。
您将需要使用git存储库中的版本来代替:
[dependencies]
qml = { git = "https://github.com/White-Oak/qml-rust" }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.