[OSM-talk] Osm2Pgsql problem linking to libxml2

Artem Pavlenko artem at pavlenko.uklinux.net
Fri Feb 9 16:14:44 GMT 2007


Casey,

This is not the best place to ask about compiling and linking on win32. 
Try MinGW or similar .

-lxml - means link to libxml library at compile time.  Those errors you're 
getting ralated to the linking (or rather not linking to libxml).
On win32 you might need to have .lib file (stub)  as well as .dll 

Cheers,
Artem

On Friday 09 February 2007 15:49, yuri bay wrote:
> Hi,
>
> I am still trying to solve the osm2pgsql compiling problem.  I wanted to
> use OSM on winGRASS and need to import OSM data into PostgreSQL.  Since
> osm2pgsql requires libxml2, I have managed to installed the libxml2, and
> have downloaded the libxml binary files as wll.  But regardless of that I
> am still having problem to compile osm2pgsql??  The following is the errors
> and I would be grateful if someone could help.  Many thanks
>
>
> gcc osm2pgsql.c -o osm2pgsql -L c:/libxml/ -lxml
>
> C:/Docume~1/Casey/Local~1/Temp/ccsDaaaa.o(.text+0xae6):osm2pgsql.c:
> undefined reference to 'xmlStrEqual'
> ....undefined reference to 'xmlStrEqual'
> ....undefined reference to 'xmlTestReaderGetAttribute'
> ....undefined reference to 'bst_insert'
> ....undefined reference to '_imp_xmlFree'
> ....undefined reference to 'avl_insert'
> ....undefined reference to 'bst_balance'
> ...
> ...
> make: *** [osm2pgsql] Error 1
>
> I have tried -lxml or -lxml2 the results were the same.  What is -lxml
> means?
>
> Best Regards
> Casey Wong
>
> >From: Nick Whitelegg <Nick.Whitelegg at solent.ac.uk>
> >To: "yuri bay" <ksh_wong at msn.com>
> >Subject: Re: [OSM-talk] Regarding libxml2 Usage
> >Date: Thu, 8 Feb 2007 12:13:55 +0000
> >
> >The way you're trying to compile libxml2 is for a Unix system. There
> >should be a binary download available for Windows - you should use that.
> >In the previous email I think you may have confused an I (9th letter of
> >the alphabet, capital) with a l (12th letter of the alphabet, lower case)
> >- it should  be the latter.
> >
> >gcc osm2pgsql.c -o osm2pgsql -lxml2
> >
> >if -lxml2 doesn't work try -lxml?
> >
> >You may also need to give it the path to where the library is with -L e.g.
> >
> >gcc osm2pgsql.c -o osm2pgsql -L c:\libxml2\lib -lxml2
> >
> >Nick
> >
> >
> >
> >
> >
> >To:     Nick.Whitelegg at solent.ac.uk
> >cc:     talk at openstreetmap.org, dev at openstreetmap.org
> >Subject:        Re: [OSM-talk] Regarding libxml2 Usage
> >
> >
> >Nick,
> >
> >I am still trying to compile osm2pgsql in MinGW so that I can use it to
> >convert OSM into GRASS usable data.  I have some progress on installing
> >libxml2.  I am suing Cygwin.  I am able to unzip the libxml2, but is
> >having
> >problem to use './configure' for the unzipped folder.  In the following,
> >part 1 is the instruction I obtained from a site that dealt with
> >installing
> >libxml2, part 2 is my errors, your help is much appreciated.
> >
> >Part 1:
> >from :
> >https://www.systinet.com/doc/ssc-65/waspc/html/extlibs.install.wssecurity.
> >html
> >
> >
> >Installing LibXML2 from sources  LocateYou can get this library from
> >http://www.xmlsoft.org/.
> >
> >cat libxml2-2.6.3.tar.gz | gunzip | tar -xf -
> >./configure --without-ftp
> >make
> >make install
> >
> >
> >Part 2:
> >
> >$ ./configure --without-ftp
> >bash: ./configure: No such file or directory
> >
> >
> >I will be grateful if you could provide some help, many thanks
> >
> >best regards
> >Casey Wong
> >
> > >From: Nick Whitelegg <Nick.Whitelegg at solent.ac.uk>
> > >To: "yuri bay" <ksh_wong at msn.com>
> > >CC: dev at openstreetmap.org
> > >Subject: Re: [OSM-talk] Regarding libxml2 Usage
> > >Date: Wed, 7 Feb 2007 17:07:40 +0000
> > >
> > >Casey,
> > >
> > >You need to link the libxml2 library in when compiling. This will be
> > >something like
> > >
> > >gcc osm2pgsql.c -o osm2pgsql -lxml2
> > >
> > >Make sure you have libxml2 installed on your system.
> > >
> > >Nick
> >
> >_________________________________________________________________
> >Get Hotmail, News, Sport and Entertainment from MSN on your mobile.
> >http://www.msn.txt4content.com/
>
> _________________________________________________________________
> Click Here To Find Your Perfect Match This Valentines!
> http://msnuk.match.com/
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk




More information about the talk mailing list