[Gdal-dev] OGRSpatialReference::exportToProj4 causes
segmentationerror
Frank Warmerdam
warmerdam at pobox.com
Wed Jul 28 14:24:49 EDT 2004
Xiaodong Zhang wrote:
>>You need to pass a pointer to a pointer where the resulting string can be
>>assigned. I'm not sure why it would work with 1.1.8 unless it was just a
>>coincidental thing about where the unitialized ppProj pointed.
>>
>>It should be something like:
>>
>> char **pszProjWKT = NULL;
>
>
> It has to be 'char *pszProjWKT' instead of double pointers, otherwise the
> compile gives the following error
>
> `OGRSpatialReference::exportToProj4 (char ***)'
> /usr/local/include/ogr_spatialref.h:209: candidates are: OGRErr
> OGRSpatialReference::exportToProj4
> (char **) const
>
> Is this what to be expected?
Hi,
Sorry, yes, you are right. I got too caught up in deciding on a name
for the variable and forgot to adjust to being just "char *" instead of "char **".
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
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