[gdal-dev] GDAL, OGR and Shapelib

Ben Discoe ben at v...
Fri Jul 20 01:25:31 EDT 2001


OK, but...
I tried adding shapelib.h to my own local gdal. It compiled with that, but
didn't find the SHP functions at link time.

Looking at gdal_i.lib, i see the SHP functions are not exposed there.

Can this be fixed, or do i really need to built and link with Shapelib
separately, which would be redundant with the Shapelib code already built
into gdal.dll?

-Ben

> -----Original Message-----
> From: Frank Warmerdam
> Sent: Thursday, July 19, 2001 8:38 PM
> To: gdal-dev at yahoogroups.com
> Subject: Re: [gdal-dev] GDAL, OGR and Shapelib
>
>
> Ben Discoe wrote:
> >
> > Before moving to GDAL, my code was using Shapelib; now i suspect that i
> > don't have to link with an external Shapelib anymore, since
> Shapelib can be
> > (is?) compiled into GDAL. However, the necessary headers (e.g.
> that define
> > 'SHPObject') aren't in the GDAL 'distribution', only in the CVS files.
> >
> > I presume that OGR encapsulates Shapelib, so one way would be port my
> > Shapelib code to use OGR instead, but that introduces a lot of
> overhead -
> > Shapelib is far simpler and more direct.
> >
> > Advice? Could the Shapelib classes be added the GDAL-exposed headers?
>
> Ben,
>
> I am not too keen on installing shapefil.h with GDAL's include files as
> a standard thing for GDAL. I think you would be pretty safe just
> carrying a copy of shapefil.h around with VTP. As long as you stick
> to calling the API (as opposed to diddling with the structures) you should
> be OK for a long time to come. Shapelib is pretty "stable".
>





More information about the Gdal-dev mailing list