[Qgis-developer] Fwd: Re: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*'

Marco Bernasocchi marco at bernawebdesign.ch
Fri Sep 21 02:47:36 PDT 2012


FYI


-------- Original Message --------
Subject: Re: [Qgis-developer] invalid conversion from 'void*' to
'OGRSpatialReferenceHS*'
Date: Fri, 21 Sep 2012 11:31:01 +0200
From: Even Rouault <even.rouault at mines-paris.org>
To: Marco Bernasocchi <marco at bernawebdesign.ch>
CC: Even Rouault <even.rouault at mines-paris.org>

Selon Marco Bernasocchi <marco at bernawebdesign.ch>:

> Thanks Even,
> bizarre that nobody had that issue before no?
>

Yes a bit. Check the compilation flags passed in your case. I assume there's
-DDEBUG in them. (or it's defined in some header)

During a long time, OGRSpatialReferenceH (and many other GDAL handles
for other
types) was a typedef of void*, but there were some errors where handles
of one
type were incorrectly passed to functions that were expecting another
type. So
it was decided that in DEBUG mode, a stricter type checking would be done to
help catching such errors, while in release mode, this wouldn't change
to avoid
affecting existing user code.





More information about the Qgis-developer mailing list