[Glade-users] Include others libraries in a Glade project

Marc Billaud wrote:

Hello everybody

I want to ask you some questions that could have already included in the
FAQ. I need to include external libraries in order to compile and make
link edit of programs which need the libXml2-2.2.0 (the last one of the
W3C) inside a glade project.
_Are there any risks of libraries conflicts with the ones that are used
by Glade ?
_What is the easy way to do this ?

I think there would be a conflict if you use libglade, since it probably
depends on the 1.8.X versions of libxml.

But if you're just using Glade-generated source you should be OK.

In the FAQ,(may be old) that I ve printed, explanations are given on how
to modify "/src/Makefile.am" in order to include .c and .h for the own
code we need to include inside a Glade project but I haven't seen any
details regarding the extern libraries which we could need to insert for

Exple:of my own "/src/Makefile.am":

XLIBS=`/usr/local/bin/xml-config --libs`
XFLAGS=`/usr/local/bin/xml-config --cflags`

        $(XFLAGS) \
        -I$(top_srcdir)/intl \

bin_PROGRAMS = project2

project2_SOURCES = \
        main.c \
        support.c support.h \
        interface.c interface.h \
        callbacks.c callbacks.h


This configuration of file failed because both variables XLIBS and
XFLAGS are not recognised properly.

As someone else said, you should probably be determining the position
of the XML libs in configure.in

You could try adding something like this to configure.in:

dnl Get libxml flags & libs
AC_PATH_PROG(xml_config, xml-config)
if test "x$xml_config" = "x"; then
  AC_MSG_ERROR([*** xml-config not found.])

XML_CFLAGS=`$xml_config --cflags 2>/dev/null`
XML_LIBS=`$xml_config --libs 2>/dev/null`


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