#include "chealpix.h"
in your code and link with something like
gcc -o myprog myprog.c -I<incdir> -L<libdir> -lchealpix
where <incdir> is where you've installed the '.h' files and <libdir> is where you've installed the libraries (See the header of the 'subs/Makefile').
You will also need the 'cfitsio' library. See
https://heasarc.gsfc.nasa.gov/docs/software/fitsio/
Version 3.82, 2022-07-28