我在64位Windows机器上使用rustc
和cargo
来编译32位应用程序.当使用稳定的工具链时,这项工作很好,但当我try 使用beta工具链时,它失败了.
beta工具链已成功安装rustup install beta
个.在项目文件夹中有一个.cargo/config
文件,其中包含以下行:
[build]
target = "i686-pc-windows-msvc"
[target.i686-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]
运行cargo +beta build
时,出现以下错误:
error[E0463]: can't find crate for `core`
|
= note: the `i686-pc-windows-msvc` target may not be installed
我曾try 运行rustup target add i686-pc-windows-msvc
来解决这个问题,但没有帮助;rustup target list
甚至显示为"已安装".可能这个命令只添加了stable的目标,我不知道如何指定beta工具链.
如何为beta工具链添加另一个(非默认)目标?