[Gdal-dev] Conflicts when using GDAL with minGW

Ozy Sjahputera sjahputerao at missouri.edu
Thu Nov 9 17:39:06 EST 2006


I have been getting the following error messages when compiling a 
program (with GDAL) using Eclipse with minGW compilers & libraries.

Severity and Description    Path    Resource    Location    Creation 
Time    Id
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio 
error: `__gnu_cxx::snprintf' has not been declared      
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio 
error: `__gnu_cxx::vsnprintf' has not been declared    
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio 
error: `::snprintf' has not been declared 
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio 
error: `::vsnprintf' has not been declared
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h 
error: `snprintf' is not a member of `std'
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h error: 
declaration of C function `float _copysign(float, float)' conflicts with 
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h error: 
declaration of C function `long double _copysign(long double, long 
double)' conflicts with
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h error: 
previous declaration `double _copysign(double, double)' here 
e:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h error: 
previous declaration `float _copysign(float, float)' here

The following is my GDAL headers included:
#include <gdal_priv.h>
#include <cpl_string.h>
#include <ogr_spatialref.h>
#include <gdalwarper.h>

It seems that the GDAL library is causing some functions in the minGW 
C++ library (cstdio) to be undeclared.

Has anyone experienced this kind of conflict?

Thanks
Ozy




More information about the Gdal-dev mailing list