Run the following command:
gcc .c file `pkg-config --cflags gstreamer-1.0` `pkg-config --libs gstreamer-1.0` -o build name
Official doc: Gstreamer Doc
Run the following commands:
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
Add this to gcc command: pkg-config --cflags --libs gstreamer-1.0