rust-sdl2、vcpkgを使う場合これどうりやってもx86をなぜかインストールするので、cargo vcpkg build --target x64-windows-static-md
と指定しても無視されるので直接vcpkgにtripletを指定して叩くと耳を傾けてくれる。
# Cargo.toml [dependencies.sdl2] version = "0.34" default-features = false features = ["ttf","image","gfx","mixer","static-link","use-vcpkg"] [package.metadata.vcpkg] dependencies = ["sdl2", "sdl2-image[libjpeg-turbo,tiff,libwebp]", "sdl2-ttf", "sdl2-gfx", "sdl2-mixer"] git = "https://github.com/microsoft/vcpkg" rev = "a267ab118c09f56f3dae96c9a4b3410820ad2f0b" [package.metadata.vcpkg.target] x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" }
> rustup default stable-x86_64-pc-windows-msvc #たまにgnuになってたりするので > cargo install cargo-vcpkg > .\target\vcpkg\vcpkg.exe --triplet x64-windows-static-md install "sdl2" "sdl2-image[libjpeg-turbo,tiff,libwebp]" "sdl2-ttf" "sdl2-gfx" "sdl2-mixer"