Re: Problem including glib.h



Actually,I found that it's nothing wrong with glib includes and static 
libraries, rather for some reason, automake does not subsititute following 
variables by the PKG_CHECK_MODULES macro.  So I substituted them manually.

PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6,
        [
		CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
		LDFLAGS="$LDFLAGS $GLIB_LDFLAGS"
        ],
        [
		AC_MSG_ERROR([Could not locate GLib.])
        ])

http://lists.gnu.org/archive/html/gcjwebplugin-devel/2003-09/txtDU0S7fR7O3.txt

Thanks,

Randima

Quoting Carlo Agrusti <carlo-ag libero it>:

> 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 configure.ac 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).
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 





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