Re: [xml] makefile sample



Thank Daniel, but I've the follwing problem: with this simple source:

#include <stdio.h>
#include <libxml/xmlreader.h>

#ifdef LIBXML_READER_ENABLED
int main(int argc, char **argv) {

   LIBXML_TEST_VERSION
   printf(stderr, "XInclude support COMPILED in\n");
   return(0);
}
#else
int main(void) {
   fprintf(stderr, "XInclude support not compiled in\n");
   exit(1);
}
#endif

compiled with your suggestion:

gcc -o reader1 `xml2-config --cflags` reader1.c `xml2-config --libs`

program display:

XInclude support not compiled in

And your similar examples work fine.......

Any ideas???

Thank's!







From: Daniel Veillard <veillard redhat com>
Reply-To: veillard redhat com
To: emanuele berinotti <beri75 hotmail com>
CC: xml gnome org
Subject: Re: [xml] makefile sample
Date: Tue, 5 Apr 2005 10:52:27 -0400

On Tue, Apr 05, 2005 at 04:29:43PM +0200, emanuele berinotti wrote:
> Hi,I'm a newbie, does anyone can post me a simple "makefile" to compile a > generic program with libxml2 support....I'm using Gcc 2.9.3 on Solaris 5.7

   http://xmlsoft.org/examples/index.html
   "gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`"

Daniel

--
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/





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