See my more complete answer at the link below
Control GPIO pins from C
But to summarize the setup that worked for me:
Raspberry Pi 3B (but I suspect this will work for RPi 4 as well).
Clean install of buster. Installing gpiod on jessie failed for me.
sudo apt-get install gpiod libgpiod-dev libgpiod-doc
The standalone applications
gpiodetect, gpioinfo, gpioget, gpioset, gpiofind and gpiomon
are installed along with two different C APIs.
API 1) Found in /usr/include/linux/gpio.h and included via:
#include <linux/gpio.h>
Note that you also need to include several system call libraries.
API 2) Found in /usr/include/gpiod.h (and gpiod.hpp for C++), and included via:
#include <gpiod.h>
I believe that installing this API is the one that also brings in the standalone apps. Programs using this API need to be compiled with something like:
gcc -o myprogram -lgpiod myprogram.c
My other contribution gives an example of API 1, as well as some links to other examples.