Before going any further, we need to install the SDL library.
Installing SDL2
Installing SDL2 on Linux
Depending on your package management tool, run the following to install SDL2 on Linux:
apt package mananger:
$ sudo apt-get install libsdl2-dev
dnf package manager:
$ sudo dnf install SDL2-devel
yum package manager:
$ yum install SDL2-devel
Once done, your SDL2 installation is ready!
Installing SDL2 on Mac
To install SDL2 on Mac, Simply run the following:
$ brew install sdl2
You're good to go!