Re: [xml] The order of arguments when compiling
- From: spam spam spam spam free fr
- To: xml gnome org
- Subject: Re: [xml] The order of arguments when compiling
- Date: Tue, 21 Feb 2012 08:47:20 +0100 (CET)
Thank you this solution works perfectly!
----- Mail original -----
De: "Noam Postavsky" <npostavs users sourceforge net>
Ã: "spam spam spam spam" <spam spam spam spam free fr>
Cc: xml gnome org
EnvoyÃ: Lundi 20 FÃvrier 2012 15:41:21
Objet: Re: [xml] The order of arguments when compiling
spam spam spam spam free fr writes:
Thank you for this option.
But if I use it like this :
bin_PROGRAMS = xmlparsefile
xmlparsefile_SOURCES = main.c
xmlparsefile_LDADD = `xml2-config --libs`
xmlparsefile_CFLAGS = -Wall -Wextra `xml2-config --cflags`
I got :
$ autoreconf
src/Makefile.am:3: linker flags such as `--libs`' belong in `xmlparsefile_LDFLAGS
make: *** [Makefile.in] Error 1
Interesting, but I think things will be cleaner if you get the flags in
configure.ac:
LIBXML_LIBS=`xml2-config --libs`
LIBXML_CFLAGS=`xml2-config --cflags`
AC_SUBST([LIBXML_LIBS])
AC_SUBST([LIBXML_CFLAGS])
or you could use the pkg-config macro which lets you check the version
too:
PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.7.8])
Then Makefile.am:
bin_PROGRAMS = xmlparsefile
xmlparsefile_SOURCES = main.c
xmlparsefile_LDADD = $(LIBXML_LIBS)
xmlparsefile_CFLAGS = -Wall -Wextra $(LIBXML_CFLAGS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]