Re: [xml] The order of arguments when compiling

2012-02-20 Thread spam . spam . spam . spam
Yes it looks more like you said, and I forgot the second step, my apologizes. I got this second step: $ gcc -Wall -Wextra `xml2-config --cflags` -g -O2 -o xmlparsefile xmlparsefile-main.o As you can see, it doesn't show the `xml2-config --libs` argument (given into my Makefile.am with the _LIBS

Re: [xml] The order of arguments when compiling

2012-02-20 Thread spam . spam . spam . spam
Hum... I prefer a solution which works if we type : $ ./configure $ make $ make install If I request my users to do : $ ./configure $ make LIBS=`xml2-config --libs` $ make install I think they will not be happy. The best thing is to edit my Makefile.am correctly. Do you know what is incorrect

Re: [xml] The order of arguments when compiling

2012-02-20 Thread spam . spam . spam . spam
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

Re: [xml] The order of arguments when compiling

2012-02-20 Thread spam . spam . spam . spam
Easy to get the -L options and -l options separatly with a good old 'cut' : $ xml2-config --libs | cut -d -f 1 -L/home/spierre/software/libxml2-2.7.8/lib $ xml2-config --libs | cut -d -f 2- -lxml2 -lz -lm My new Makefile.am: bin_PROGRAMS = xmlparsefile xmlparsefile_SOURCES = main.c

Re: [xml] The order of arguments when compiling

2012-02-20 Thread Noam Postavsky
spam.spam.spam.s...@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