検証環境
Windows10 Home Edition $ gcc --version gcc.exe (rubenvb-4.5.4) 4.5.4 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
コンパイラの target processor 確認
コンパイラが 32bit/64bit どちらの CPU に対応しているか確認する
$ gcc -dumpmachine
x86_64-w64-mingw32
SDL2 のダウンロード
下記サイトのダウンロードページから SDL2-devel-2.0.7-mingw.tar.gz をダウンロードする
Simple DirectMedia Layer - Homepage
下記コマンドで解凍する
$ gzip -dc SDL2-devel-2.0.7-mingw.tar.gz | tar xvf -
SDL2 のインストール
arch は先ほど確認した target processor を指定する
$ cd SDL2-2.0.7 $ make install-package arch=x86_64-w64-mingw32 prefix=/usr