[geos-devel] Undefine references in libgeos_c 2.2.3

strk at refractions.net strk at refractions.net
Mon Jul 10 06:20:42 EDT 2006


Do you mean you're using -lgeos -lgeos_c ?
One problem might be that libgeos_c.so *knows* which version
of libgeos.so to link against, while manual link could pick up
a wrong one (ie: manual -lgeos would link against 3.0.0 while
libgeos_c.so from 2.2.3 needs to use libgeos.so from 2.2.3!)

--strk;

On Mon, Jul 10, 2006 at 09:22:09AM +0200, Mateusz Loskot wrote:
> Hi,
> 
> Yesterday, one of GDAL users reported that GDAL CVS does not build
> with GEOS 2.2.3.
> I investigated the problem and noticed two issues.
> The first one is related to GDAL autotools (already fixed).
> But the second one seems to be related to GEOS itsef.
> 
> I downloaded fresh GEOS 2.2.3 release and build it in standard way:
> 
> $ ./configure
> $ make
> $ sudo make install
> 
> Next, I checkouted GDAL from CVS and tried to build it too.
> The libgdal library builds and links well, but linking
> OGR utilities fails with following message:
> 
> /bin/sh /home/mloskot/tmp/gdal-cvs/gdal/libtool --mode=link     g++
> ogrinfo.o /home/mloskot/tmp/gdal-cvs/gdal/libgdal.la -o ogrinfo
> g++ ogrinfo.o -o .libs/ogrinfo
> /home/mloskot/tmp/gdal-cvs/gdal/.libs/libgdal.so -L/usr/local/lib
> -L/usr/lib -lpq -lrt -ldl -lpthread
> /usr/local/lib/libgeos_c.so.1: undefined reference to
> `geos::WKBReader::read(std::basic_istream<char, std::char_traits<char> >&)'
> /usr/local/lib/libgeos_c.so.1: undefined reference to
> `geos::WKBWriter::write(geos::Geometry const&, std::basic_ostream<char,
> std::char_traits<char> >&)'
> /usr/local/lib/libgeos_c.so.1: undefined reference to
> `geos::Point::getCoordinatesRO() const'
> /usr/local/lib/libgeos_c.so.1: undefined reference to
> `geos::WKBWriter::WKBWriter(int, int)'
> collect2: ld returned 1 exit status
> make[1]: *** [ogrinfo] Error 1
> make[1]: Leaving directory `/home/mloskot/tmp/gdal-cvs/gdal/ogr'
> make: *** [ogr-apps] Error 2
> 
> I checked 2.2.3 sources and all calls listed above are declared (.h) and
> defined (.cpp) properly.
> 
> It seems to be a problem with -lgeos -lgeos_c linking but I'm not sure.
> 
> Any ideas?
> 
> Cheers
> -- 
> Mateusz Loskot
> http://mateusz.loskot.net
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the geos-devel mailing list