SDL の最新版 は,「Simple DirectMedia Layer」の略で, 次の機能などを持つ.
3次元グラフィックス・カードは,OpenGL を経由して使用する. SDL は,種々の OS (Linux, WInodws, MacOS, FreeBSD などなど)で動く. SDL は C 言語で書かれ,C++ からも使える.Java, Perl, PHP, Python 等等の種々の言語からも使える.
目次
Windows での Visual Studio Community 2022 のインストール: 別ページ »で説明
Visual Studio Community 2022 に, Build Tools for Visual Studio 2022の機能が含まれている.
Windows での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明
【関連する外部ページ】
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
Windows での Python 3.10 のインストール,pip と setuptools の更新: 別ページ »で説明
Python の公式ページ: https://www.python.org/
C: cd %HOMEPATH% rmdir /s /q SDL
cd %HOMEPATH% git clone --recursive https://github.com/libsdl-org/SDL
cmake でのオプションについて
cmake のオプションの 「Visual Studio 17 2022」のところは, 使用する Visual Studio のバージョンにあわせること. Visual Studio 2022 のときは,「Visual Studio 17 2022」. Visual Studio 2019 のときは,「Visual Studio 16 2019」
cmake の実行手順例は次の通り
cd %HOMEPATH% cd SDL rmdir /s /q build mkdir build cd build del CMakeCache.txt cmake .. -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX="c:/sdl"
※ 下の通りになるとは限らない.エラーメッセージが出るなど場合は,前で cmake を実行したときの設定を変えてやり直す.
cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "[System.Environment]::SetEnvironmentVariable(\"SDL2_ROOT\", \"C:\sdl\", \"Machine\")"