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

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


Hi Even,

On 09/21/2012 04:31 PM, Even Rouault wrote:
> 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)
I call qgis cmake with CMAKE_BUILD_TYPE=Debug, but I gues I'm not the
first qgis dev to do that :)
> 
> 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.
Sounds reasonable.

Anybody else experiencing this?

ciao
Marco
> 


-- 
Marco Bernasocchi
http://opengis.ch


More information about the Qgis-developer mailing list