I want to compile and install geany text editor in Windows 7 by using cygwin. I follow the usual way to compile and install C source:

make install

the configure script was successfully running and give me no errors.In the make step i have the following errors :

ctags.c:23:18: fatal error: glib.h: No such file or directory
#include <glib.h>

I have installed pkg-config and also add the pkg-config output to makefile by doing the following:

CFLAGS = $(shell pkg-config --cflags glib-2.0)
CXXFLAGS = $(shell pkg-config --cflags glib-2.0)
LIBS = $(shell pkg-config --libs glib-2.0)

This is the output of the pkg-config

$pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -lintl -lpcre -lintl - liconv -lpcre

$ pkg-config --libs glib-2.0
-lglib-2.0 -lintl -lpcre -lintl -liconv -lpcre

Any idea how to fix this ?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


Try to add compiler flags to configure script, so that they are propagated to all Makefile files.

./configure CFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" CXXFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" LDFLAGS="-lglib-2.0 -lintl -lpcre -lintl -liconv -lpcre"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.