現象
コンパイル時に以下のエラーが出てkernel32-sysのコンパイルが失敗する。
error: linking with `link.exe` failed: exit code: 1
(中略)
Caused by:
Could not compile `kernel32-sys`.
対処方法
Rustの(windows-msvc版ではなく)windows-gnu版をインストールする。
https://www.rust-lang.org/en-US/other-installers.html#standalone
おまけ
C++ build tools for Visual Studioもインストールしなくて良くなる。
環境
- OS: Windows7 32bit
- Rust: 0.19.0
- Cargo: 0.20.0
参考