[xml] libXML2: Need help on building libXML2 on Unix



Hi,
   My name is Jewel Nandy. I have downloaded libxml2-2.6.31 to use it in my project for XML parsing. I have to use it on Unix platform. I could build it on Unix successfully. The command that I gave for building is:
    ./configure --prefix destination_location
    make;
    make install;

I have linked the created libxml2.a with my own lib(.a) and that was also built successfully. Now when I am linking my own created lib with my main application and trying to build it, it gives error saying:

Undefined symbols            found in file
inflate                             /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(nanohttp.o)
crc32                               /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
gzrewind                            /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
deflateEnd                          /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
inflateEnd                          /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(nanohttp.o)
deflateInit2_                       /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
libiconv_close                      /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(encoding.o)
gzopen                              /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
gzread                              /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
libiconv_open                       /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(encoding.o)
inflateInit2_                       /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(nanohttp.o)
deflate                             /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
gzclose                             /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
gzdopen                             /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
gzwrite                             /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(xmlIO.o)
libiconv                            /export/home/hstes/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a(encoding.o)

    
     I have linked libxml2.a in this application's makefile also. Please see below:
LIBXML2 = $(HOME)/devsrc/libxml2-2.6.31/unixBin/lib/libxml2.a

 $(BIN)/testXml : $(ARCH)/testXml.o $(THDLIB) $(LIBXML2)
    $(CC) $(CFLAGS) $(LDFLAGS) $(ARCH)/testXml.o \
        $(LIBS)  -o $@

I thought this would solve my problem. But it seems, I have to mention all above not-found .o in this makefiles.

Please suggest me the right way of building libXml, so that I dont get this problem. My query is: do I have to mention those .o files in my application's makefile? If no, whats the approach to rectify this error?

--
Thanks--
   Jewel Nandy



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