[gdal-dev] SHP support in GDAL vs. GDAL-OGR

Frank Warmerdam warmerdam at p...
Mon Jan 14 14:05:21 EST 2002


Ben Discoe wrote:


> Unfortunatly this didn't work. Apparently there is also another macro like
> this:
> 
> #define SHPAPI_CALL1(x) * SHPAPI_CALL
> 
> which is unhappy. I get compile errors on the lines with SHPAPI_CALL1:
> 
> shapefil.h(240) : error C2059: syntax error : 'type'
> shapefil.h(249) : error C2059: syntax error : 'type'
> [...]
> 
> I need to call both GDAL and shapelib.
> I suppose there are 3 options here:
> 1. Try to build shapelib to a separate library, and link it in 
> redundantly
> with the copy in GDAL (praying there are no conflicts).
> 2. Try to modify the export status of shapelib in GDAL (as above, 
> perhaps
> there is some way to fix it)
> 3. Don't use shapelib, but do everything through OGR. I would be very
> unhappy since using shapelib is so much simpler, clear and direct.


Ben,

Looking in the makefile.vc for Shapelib, it does this:

/DSHPAPI_CALL=__stdcall

I would suggesting adding this to the makefile.vc entry for the makefile.vc
in the gdal/ogr/ogrsf_frmts/shape/makefile.vc. If it works, I will add
it into the master.

The problems relate to stuff I did to make Shapelib work properly for VB or
Delphi users. I can't remember all the details.

If the above doesn't work (and I am not at all sure it will), then I will
hack up shapefil.h in an appropriate manner.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent






More information about the Gdal-dev mailing list