[英]Failed to run `rustc` error. (Rust cargo build issue)
Im trying to cargo build a file but have some issues.我试图建立一个文件,但有一些问题。
I set rustup nightly-x86_64-pc-windows-msvc default but still get the error.我将 rustup nightly-x86_64-pc-windows-msvc 设置为默认值,但仍然出现错误。
RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown
Error:错误:
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names '-C link-arg=-s' --target wasm32-unknown-unknown --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are `-` and `'-C`)
Thanks for help and solutions感谢您的帮助和解决方案
If you're using cmd
, try using the set
command to set the environment variable.如果您使用的是
cmd
,请尝试使用set
命令设置环境变量。 You can also try using double-quotes ( "
) or no quotes.您也可以尝试使用双引号 (
"
) 或不使用引号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.