[FWTools] Connecting FWTools/OGR to g++
Frank Warmerdam
warmerdam at pobox.com
Sat Jul 15 21:50:33 EDT 2006
Chris Everhart wrote:
> OK, so I found this:
>
> http://lists.maptools.org/pipermail/fwtools/2006-January/000269.html
>
> and tried it. I used this code (from the tutorial):
> #include "gdal.h"
>
> int main()
> {
> GDALDatasetH hDataset;
>
> GDALAllRegister();
> }
>
> And here is the result (with gcc):
> Owner at dworksgis /cygdrive/c/Program Files/FWTools1.0.5
> $ gcc -I "C:/Program Files/FWTools1.0.5/include" geotest.cpp
> In file included from C:/Program Files/FWTools1.0.5/include/cpl_port.h:156,
> from C:/Program Files/FWTools1.0.5/include/gdal.h:135,
> from geotest.cpp:1:
> c:/MinGW/include/math.h:672: declaration of C function `float
> _copysign(float,
> float)' conflicts with
> c:/MinGW/include/math.h:671: previous declaration `double _copysign(double,
> double)' here
> c:/MinGW/include/math.h:673: declaration of C function `long double
> _copysign(long double, long double)' conflicts with
> c:/MinGW/include/math.h:672: previous declaration `float _copysign(float,
> float)' here
>
> If I compile it without the include path, the result is this:
> $ g++ geotest.cpp -o ogrTest
> C:\DOCUME~1\Owner\LOCALS~1\Temp/ccWWcaaa.o(.text+0x1f):geotest.cpp:
> undefined re
> ference to `GDALAllRegister'
>
> So I definately need to add the include path, but do I need to somehow
> override the builtin "math.h"?
Chris,
Sorry, I just don't know the answer to this. This isn't a supported
configuration.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the FWTools
mailing list