'Make' error - glib.h no such file or directory
Solution 1:
It appears that gcc
can't find the glib.h
which is a part of the libglib2.0-dev
package. Make sure you've installed libgtk2.0-0-dev
package (which depends on libglib2.0-dev
) and try again.
Solution 2:
You need to tell make
to use pkg-config
to find out the compiler flags. Like so
CFLAGS = `pkg-config --cflags glib-2.0`
LDLIBS = `pkg-config --libs glib-2.0`
make
will execute pkg-config
and use the output to fill in CFLAGS
and LDLIBS
Solution 3:
You need to add pkg-config --cflags --libs glib-2.0
in make file.
It should look like this:
gcc `pkg-config --cflags --libs glib-2.0` file.c