Personal practice project which includes example usage of the beautifully written modern RAII SDL abstraction (src/sdl.hpp). Includes SDL, SDL_image, SDL_ttf.
- MacOS
- Windows (MSYS2)
- Linux
- FreeBSD
git clone https://github.com/TejasPersonal/Tengin.git
cd Tengin- C/C++ toolchain
- SDL (version 3.x.x)
- SDL_image (version 3.x.x)
- SDL_ttf (version 3.x.x)
-
Arch Linux:
sudo pacman -S clang sdl3 sdl3-image sdl3-ttf --noconfirm sudo pacman -S pkgconf # for static linking -
Windows (MSYS2):
- CLANG* (Native):
pacman -S pactoys --noconfirm pacboy -S clang sdl3 sdl3-image sdl3-ttf --noconfirm pacboy -S pkgconf # for static linking - MSYS:
pacman -S clang sdl3 sdl3-image sdl3-ttf --noconfirm pacman -S pkgconf # for static linking
- CLANG* (Native):
-
MacOS:
Install Homebrew if not installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Then:
xcode-select --install brew install sdl3 sdl3_image sdl3_ttf brew install pkgconf # for static linking
-
Dynamic Linking
clang++ -o build/totpad src/main.cpp -lSDL3 -lSDL3_image -lSDL3_ttf
-
Static Linking
clang++ -o build/totpad src/main.cpp -static $(pkg-config --libs --static sdl3 sdl3-image sdl3-ttf)
Note: clang++ can be used interchangeably with g++ if available
cd build
./totpad