Re: Problem including glib.h

Randima Niroshini ha scritto lo scorso 18/03/2006 02:24:
> Hi,
> I am trying to use glib under a Linux. glib is installed 
> under /usr/include/glib-2.0, however, when I' m trying to include glib.h in my 
> program and do make, it gives an error as follows. "glib.h: No such file or 
> directory"
> I have also included, the package checking to since I am using 
> automake. 
> PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6, have_glib=true, have_glib=false)
> Accordingly, make file shows the following path where glib is located.
> GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
Here is the answer to your question; what does a

$ ls /usr/include/glib-2.0

command show? Having glib installed on your system does not necessarily
mean that you have all includes and static libraries; for example - on a
Debian system - you have to:

# apt-get install libglib-2.0

in order to have glib-2.0 runtimes (i.e. .so files) and

# apt-get install libglib-2.0-dev

in order to have all development sources (.h, .a and .la).

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]