官术网_书友最值得收藏!

Windows (MinGW)

A few steps will be required in order to make all of it work. Follow the guide!

  1. Download mingw development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz).
  2. Unpack to a folder of your choice. (You can delete it afterward.)
  1. Copy all lib files from the following path:
     SDL2-devel-2.0.x-mingw\SDL2-2.0.x\x86_64-w64-mingw32\lib

Next, copy it to this path:

    C:\Program Files\Rust\lib\rustlib\x86_64-pc-windows-gnu\lib

Alternately, you can copy to your library folder of choice and ensure that you have a system environment variable as follows:

    LIBRARY_PATH = C:\your\rust\library\folder

For Rustup users, this folder will be at the following location:

      C:\Users\{Your Username}.multirust\toolchains\{current
toolchain}\lib\
rustlib\{current toolchain}\lib

Here, the current toolchain is probably stable-x86_64-pc-windows-gnu.

  1. Copy SDL2.dll from the following:
     SDL2-devel-2.0.x-mingw\SDL2-2.0.x\x86_64-w64-mingw32\bin

The copied SDL2.dll is pasted into your cargo project, right next to your Cargo.toml.

  1. When you're shipping your game, make sure that you copy SDL2.dll to the same directory that your compiled exe is in; otherwise, the game won't launch.
主站蜘蛛池模板: 繁峙县| 瓦房店市| 封开县| 称多县| 庐江县| 建水县| 蓝山县| 民勤县| 乌兰察布市| 东港市| 黄石市| 邯郸县| 锡林浩特市| 洞口县| 双桥区| 蓬安县| 石渠县| 达拉特旗| 无为县| 馆陶县| 双流县| 辉县市| 石城县| 安庆市| 东港市| 犍为县| 乌审旗| 玛纳斯县| 南江县| 渑池县| 荆门市| 黎城县| 无锡市| 西青区| 泸溪县| 盐城市| 冷水江市| 手机| 福鼎市| 淳化县| 闽侯县|