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-devdnf package manager:
$ sudo dnf install SDL2-develyum package manager:
$ yum install SDL2-develOnce done, your SDL2 installation is ready!
Installing SDL2 on Mac
To install SDL2 on Mac, Simply run the following:
$ brew install sdl2You're good to go!