-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling games with SDL2
(These are the steps followed for a Raspberry Pi 4 with 2 GB of memory running Raspberry OS "bookworm" as the user "pi".)
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ cat /etc/debian_version
12.4
sudo apt update
sudo apt full-upgrade
sudo apt -y install cmake
sudo apt list --installed | grep sdl2
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libsdl2-2.0-0/stable,now 2.26.5+dfsg-1 arm64 [installed,automatic]
libsdl2-image-2.0-0/stable,now 2.6.3+dfsg-1 arm64 [installed,automatic
libsdl2-mixer-2.0-0/stable,now 2.6.2+dfsg-2 arm64 [installed,automatic]
libsdl2-ttf-2.0-0/stable,now 2.20.1+dfsg-2 arm64 [installed,automatic]
sudo apt -y install libsdl2-dev
sudo apt -y install libsdl2-image-dev
sudo apt -y install libsdl2-mixer-dev
sudo apt -y install libsdl2-ttf-dev
sudo apt list --installed | grep sdl2-dev
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libsdl2-dev/stable,now 2.26.5+dfsg-1 arm64 [installed]
libsdl2-image-dev/stable,now 2.6.3+dfsg-1 arm64 [installed]
libsdl2-mixer-dev/stable,now 2.6.2+dfsg-2 arm64 [installed]
libsdl2-ttf-dev/stable,now 2.20.1+dfsg-2 arm64 [installed]
cd ~/Documents
git clone https://github.com/TheSaturdayThing/Arcade.git
cd ~/Documents/Arcade/src/Test
mkdir build
cd build
cmake ..
make
./Test
cd ~/Documents/Arcade/src/Pong
mkdir build
cd build
cmake ..
make
cd ..
ln -s build/Pong .
./Pong
cd ~/Documents/Arcade/src/PacMan
mkdir build
cd build
cmake ..
make
cd ..
ln -s build/Pacman .
./PacMan