[Gdal-dev] GDAL conflicts (copysign() and snprintf() )

Ozy Sjahputera sjahputerao at missouri.edu
Fri Nov 10 17:55:03 EST 2006

I am trying to build a C++ project that uses GDAL by including 
gdal_priv.h, cpl_string.h, ogr_spatialref.h and gdalwarper.h.  The 
project was initially created in a Linux environment (Gentoo) and was 
running fine.  While the linux box is being rebuilt, I have to work 
using an XP machine.  The project compiles and runs fine when built 
using VC .NET (2003).  But it throws errors when built using MinGW (with 
Eclipse CDT IDE). 

The two functions cited for these errors are copysign and snprintf. 
After some digging I found that cpl_config.h contains some constants 
that indicates whether these functions are present. 
I am guessing that the settings in cpl_config.h are designed to work 
with VC++ libraries, but problems arises when one uses MinGW libraries.

Any idea how to resolve these conflicts? 



More information about the Gdal-dev mailing list