[Qgis-developer] Raster provider - need to define 'round' on Windows

Alister Hood alister.hood at synergine.com
Thu Mar 10 20:26:03 EST 2011


Hi everyone,
Sorry if this has already been covered and I missed it.
Building Trunk on Windows I had these errors, and when trying to load
any 
raster file I got a message that it wasn't a supported raster source:

4>Compiling...
4>qgsgdalprovider.cpp
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(562) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(566) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(571) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(575) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(664) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(665) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(669) : error
C3861: 'round': identifier not found
4>..\..\..\..\qgis\src\providers\gdal\qgsgdalprovider.cpp(670) : error
C3861: 'round': identifier not found
4>Build log was saved at
"file://c:\OSGeo4W\building\build\src\providers\gdal\gdalprovider.dir\Re
lWithDebInfo\BuildLog.htm"
4>gdalprovider - 8 error(s), 0 warning(s)
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========


The problem was resolved by adding the following:

#ifdef WIN32
inline double round( double d ){    return floor( d + 0.5 );}
#endif


Regards,
Alister


More information about the Qgis-developer mailing list