[gdal-dev] Re: Conflicts when using GDAL with minGW
Ari Jolma
ari.jolma at tkk.fi
Wed Feb 25 02:01:35 EST 2009
LF kirjoitti:
> Ozy Sjahputera <sjahputerao <at> missouri.edu> writes:
>
>
>> ...
>>
>> 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
>>
>>
>
> Hi
> I've a problem like your one.
> I tried to compile a PLUGIN for GDAL and I included files as following:
>
> #include gdal_priv.h
> #include hdf5.h
> #include gdal_pam.h
> #include gdal_priv.h
> #include cpl_string.h
> #include ogr_spatialref.h
> #include cpl_list.h
>
> I had two conflicts between mingw and gdal for variables *_copysign*
> and *ssize_t*, defined in both mingw and gdal.
> Should I define some macros or other else when I want to compile GDAL
> with MinGW?
>
> Someone could help us??
>
I don't get any errors compiling in msys ("gcc -I/local/include
-Ihdf5-1.8.2/src test.cpp") simple programs with those includes. I don't
use hdf5 so I used hdf5.h from a configured source I just downloaded.
My gcc is 3.4.5
Best regards,
Ari
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Prof. Ari Jolma
Environmental Management Information Technology
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 4511 address: POBox 5300, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://geoinformatics.tkk.fi
More information about the gdal-dev
mailing list