RUST如何在64位windows上编译32位的应用程序

无极科技客户经理 2020-7-21 1242

rustup toolchain install stable-i686-pc-windows-msvc
rustup default stable-i686-pc-windows-msvc

1.在~/.cargo/config中加入以下行(注意第2行的意思是静态编译,这样编译出来的程序没有依赖,客户不用再在电脑上安装相应的依赖):

[target.i686-pc-windows-msvc]

rustflags = ["-C", "target-feature=+crt-static"]

2.在使用cargo进行编译

cargo build --release 


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回