[Gdal-dev] Linking problem

Curt, WE7U archer at eskimo.com
Thu Sep 8 15:42:46 EDT 2005


On Thu, 8 Sep 2005, Curt, WE7U wrote:

> Just had an interesting linking problem.  This is with the CVS GDAL,
> plus using separate libshp, libproj, and libgeotiff in our app as
> well (not using the gdal interface for those cases).
>
> Using libgeotiff-1.1.5, libshp-1.0.1, libproj.0.4.2.
>
> "-lgdal" was earlier than the other libraries on the link line.
>
> GDAL's configure decided to use its internal geotiff library because
> it failed to find TIFFGetTagListCount in the TIFF library
> (libtiff-3.5.7 is on this system).
>
> So... To make a long story short Xastir was using the header files
> for the older libtiff and libgeotiff but linking in the library code
> from GDAL's internal libraries instead.
>
> This caused all of the GTIFProj4FromLatLong() calls in our code to
> fail.
>
> Best way to fix this?  Temporarily we moved "-lgdal" to the end of
> our link line.  This solved the problem, but of course could cause
> others.

What should we be looking to do long-term?  Switch to using GDAL's
interface exclusively instead of libproj + shapelib + libgeotiff +
gdal?  We started out using shapelib/libproj/libgeotiff years ago.
GDAL is a relatively new addition to our project.

I assume that the libproj/shapelib/libgeotiff API's are not visible
from GDAL, correct, so we'll have to use GDAL + OGR API's
exclusively in that case?

If so it'll take us quite a while to get there, plus we have a bunch
of optimizations/customizations in our shapefile and geotiff drawing
code that we'll have to carefully convert.

--
Curt, WE7U.   APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Gdal-dev mailing list