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

Windows (MSVC)

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

  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 choice. (You can delete it afterward.)
  3. Copy all lib files from the following path:
      SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\

The lib files will be pasted here:

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

Alternatively, they'll be pasted to your library folder of choice. Ensure that you have a system environment variable with the following:

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

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

  1. Copy SDL2.dll from the following code snippet:
      SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\

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.
主站蜘蛛池模板: 崇明县| 曲靖市| 塔城市| 榆社县| 宿松县| 阿克陶县| 密山市| 两当县| 葫芦岛市| 静乐县| 双城市| 郸城县| 鄯善县| 五大连池市| 仲巴县| 大冶市| 久治县| 手游| 博野县| 汝州市| 德格县| 林芝县| 博白县| 景洪市| 巴彦淖尔市| 衡阳县| 荥经县| 五家渠市| 屏东县| 温泉县| 鄯善县| 新余市| 吉木萨尔县| 渭源县| 呈贡县| 政和县| 藁城市| 南郑县| 南召县| 靖西县| 新乐市|