Merge pull request #551 from dagit/master

Add MSVC install instructions
This commit is contained in:
Tony Aldridge
2016-11-05 11:56:55 +00:00
committed by GitHub
+30 -4
View File
@@ -99,8 +99,6 @@ use_sdl2_mac_framework = ["sdl2/use_mac_framework"]
```
### Windows (MinGW)
On Windows, make certain you are using the MinGW version of SDL; the native
version will crash on `sdl2::init`.
1. Download mingw development libraries from
http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz).
@@ -117,14 +115,42 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz).
or to your library folder of choice, and ensure you have a system environment variable of
> LIBRARY_PATH = C:\your\rust\library\folder
For Multirust Users, this folder will be in
> C:\Users\{Your Username}\AppData\Local\.multirust\toolchains\{current toolchain}\lib\rustlib\x86_64-pc-windows-gnu\lib
For Rustup users, this folder will be in
> C:\Users\\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib
Where current toolchain is likely `stable-x86_64-pc-windows-gnu`.
4. Copy SDL2.dll from
> SDL2-devel-2.0.x-mingw\SDL2-2.0.x\x86_64-w64-mingw32\bin
into your cargo project, right next to your Cargo.toml.
### Windows (MSVC)
1. Download MSVC development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-VC.zip).
2. Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards).
3. Copy all lib files from
> SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\
to (for Rust 1.6 and above)
> C:\Program Files\Rust\\**lib**\rustlib\x86_64-pc-windows-msvc\lib
or to (for Rust versions 1.5 and below)
> C:\Program Files\Rust\\**bin**\rustlib\x86_64-pc-windows-msvc\lib
or to your library folder of choice, and ensure you have a system environment variable of
> LIB = C:\your\rust\library\folder
For Rustup users, this folder will be in
> C:\Users\\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib
Where current toolchain is likely `stable-x86_64-pc-windows-msvc`.
4. Copy SDL2.dll from
> SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\
into your cargo project, right next to your Cargo.toml.
# Installation
If you're using [cargo][crates] to manage your project, you can