How to compile a GTK4 application in Ubuntu 21.10?

You will need to install libgtk-4-dev, with the command

sudo apt install libgtk-4-dev