1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Rust sdl2 crate 自分用インストール備忘録(Windows)

Posted at

この記事は

WindowsでRustのsdl2クレートを使うために、SDLからSDL2-devel-2.0.x-VC.zipをダウンロード(間違ってSDL2-2.0.x.zipを落として来るなよ(一敗))したものの、sdl2Readme.mdで指示された場所にファイルを設置しても

LINK : fatal error LNK1181

を吐き続けた。
その後、色々試した結果うまくいく場所を見つけたので、備忘録として残しておく。

注意

この記事の内容は。「よくわかんないけど動きました」的なことなので、全く再現性はとれていない。しかし、私とあなたの環境でくらいなら上手くいくかもしれない。

環境

OS: Windows 10
rustc: 1.46.0
Rustのインストールフォルダ: C:\Rust

結論

Rustをインストールした場所の

\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib

に、SDL2.dll, SDL2.lib, SDL2main.lib, SDL2test.lib を置くべし。
つまり私の環境では

C:\Rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib

になるわけやね。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?