[Gdal-dev] Cygwin CVS errors

Norman Vine nhv at cape.com
Tue Apr 1 06:26:31 EST 2003


Frank Warmerdam writes:
>
> Norman Vine wrote:
> > Hi all,
> >
> > Trying to build GDAL CVS today with Cygwin I get the errors below
> >
> > On further investigation I find
> >
> > from ograssemblepolygon.cpp
> > OGRPolygon *OGRBuildPolygonFromEdges( ... )
> >
> > and from ogr_api.h:
> > OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( ... )
> >
> > Any advice appreciated
>
> Norman,
>
> I am not sure why this would have arisen recently, but I have added
> ogr/ograssemblepolygon.o to the list of files forcably included in
> the shared library.  This change is in GDALmake.opt.in so you will need
> to update it from CVS, and re-run config.status.
>
> Let me know if this doesn't resolve the problem.

Frank,

That didn't seem to help,  so working on the assumption that this was
just a function signature problem between the 'C' and the 'C++' code
I tried the following patch which seems to work :-)

Not sure if this is the cleanest way todo this but then again
adding a 'C'  Interface to a C++ library is sometimes a bit
'tricky' anyway esp with Cygwin Dlls

Cheers

Norman


Index: ograssemblepolygon.cpp
===================================================================
RCS file: /cvsroot/osrs/gdal/ogr/ograssemblepolygon.cpp,v
retrieving revision 1.6
diff -c -w -r1.6 ograssemblepolygon.cpp
*** ograssemblepolygon.cpp	31 Mar 2003 15:55:42 -0000	1.6
--- ograssemblepolygon.cpp	1 Apr 2003 11:14:46 -0000
***************
*** 178,183 ****
--- 178,199 ----
   *
   */

+ CPL_C_START
+ typedef void *OGRGeometryH;
+ OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( OGRGeometryH
hLinesAsCollection,
+                                                int bBestEffort,
+                                                int bAutoClose,
+                                                double dfTolerance,
+                                                OGRErr * peErr )
+ {
+     OGRBuildPolygonFromEdges( (OGRGeometryCollection *)hLinesAsCollection,
+                               bBestEffort,
+                               bAutoClose,
+                               dfTolerance,
+                               peErr );
+ }
+ CPL_C_END
+
  OGRPolygon *OGRBuildPolygonFromEdges( OGRGeometryCollection * poLines,
                                        int bBestEffort,
                                        int bAutoClose,





More information about the Gdal-dev mailing list