- Set linker flags (for debug)
$env:CFLAGS='-MDd'
$env:CXXFLAGS='-MDd'
- Get list of extra static libs
$env:RUSTFLAGS="--print native-static-libs"
- Compile
cargo build --target=x86_64-pc-windows-msvc
- Include
lib.rs.h
- Add
.lib
dependencies (yours and the extra ones +msvcrtd.lib
+ any other ones to resolve linker issues)