Re: [xml] The order of arguments when compiling



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 
option).

Also, be careful because the `xml2-config --ldflags` is a bad usage because the '--ldflags' option doesn't 
exists:
---
`$ xml2-config --ldflags
Usage: xml2-config [OPTION]

Known values for OPTION are:

  --prefix=DIR          change libxml prefix [default /home/spierre/software/libxml2-2.7.8]
  --exec-prefix=DIR     change libxml exec prefix [default /home/spierre/software/libxml2-2.7.8]
  --libs                print library linking information
  --cflags              print pre-processor and compiler flags
  --modules             module support enabled
  --help                display this help and exit
  --version             output version information
---

With Automake, the value of the "_LDFLAGS" option is not put at the end of the compilation line. And it's the 
real problem.
I got something like this :
$ gcc -Wall -Wextra  `xml2-config --cflags` `xml2-config --libs` -o xmlparsefile xmlparsefile-main.o
But I would like something like this :
$ gcc -Wall -Wextra  `xml2-config --cflags` -o xmlparsefile xmlparsefile-main.o `xml2-config --libs`

Do you know how to do this?

----- Mail original -----
De: "Noam Postavsky" <npostavs users sourceforge net>
Ã: xml gnome org
EnvoyÃ: Vendredi 17 FÃvrier 2012 17:39:25
Objet: Re: [xml] The order of arguments when compiling

On Fri, Feb 17, 2012 at 7:12 AM,  <spam spam spam spam free fr> wrote:
The compile does now :
$ gcc -DPACKAGE_NAME=\"xmlparsefile\" -DPACKAGE_TARNAME=\"xmlparsefile\" -DPACKAGE_VERSION=\"0.1\" 
-DPACKAGE_STRING=\"xmlparsefile\ 0.1\" -DPACKAGE_BUGREPORT=\"samson pierre etud univ-montp2 fr\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"xmlparsefile\" -DVERSION=\"0.1\" -I. Â Â-Wall -Wextra `xml2-config --cflags` 
-g -O2 -MT xmlparsefile-main.o -MD -MP -MF .deps/xmlparsefile-main.Tpo -c -o xmlparsefile-main.o `test -f 
'main.c' || echo './'`main.c
mv -f .deps/xmlparsefile-main.Tpo .deps/xmlparsefile-main.Po

So, it does something like this :
$ gcc -Wall -Wextra `xml2-config --cflags` main.c

That looks more like this:
$ gcc -Wall -Wextra  `xml2-config --cflags` -c -o main.o main.c

There should be a second linking step which should like this:
$ gcc -Wall -Wextra  `xml2-config --cflags` main.o `xml2-config --ldflags`
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml



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