glib.h is part of "libglib2.0-dev" package. So make sure to install this package.
If that does not solve the problem, it may be because the application you are building expects glib development files in a different directory. In that case, you will need to manually specify information about glib-2.0 library in your Makefile. To find out what information to add to Makefile, you can use pkg-config command, which automatically finds metadata about installed libraries.
Run the following command, and put the output of the command in your Makefile.
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0
In this example, the command returns the above string. So in this case, I will specify "-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" and "-lglib-2.0" somewhere in my Makefile.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.