curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
配置镜像~/.cargo/config.toml
[source.crates-io]
replace-with = 'mirror'
[source.mirror]
registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
安装 xwin
cargo install xwin --locked
xwin --accept-license splat --output ./xwin
clang++ --target=x86_64-pc-windows-msvc -isystem xwin/crt/include -isystem xwin/sdk/include/ucrt -isystem xwin/sdk/include/um -isystem xwin/sdk/include/shared -fuse-ld=lld-link -L xwin/crt/lib/x86_64 -L xwin/sdk/lib/ucrt/x86_64 -L xwin/sdk/lib/um/x86_64 main.cpp -o /mnt/c/Users/icuxika/Desktop/CrossCompilationDemo.exe -luser32