tudelft3d / prepair

Automatic repair of single polygons (according to the OGC Simple Features / ISO19107 rules) using a constrained triangulation.
GNU General Public License v3.0
115 stars 24 forks source link

GDAL 2.3.0 support #34

Closed ronanduddy closed 2 years ago

ronanduddy commented 6 years ago

Hi there,

Is it known whether or not prepair supports GDAL 2.3.0 which uses C++11?

After running make I get the following error:

Scanning dependencies of target prepair
[ 25%] Building CXX object CMakeFiles/prepair.dir/TriangleInfo.cpp.o
[ 50%] Building CXX object CMakeFiles/prepair.dir/PolygonRepair.cpp.o
In file included from /Users/ronanduddy/dev/prepair_original/PolygonRepair.cpp:22:
In file included from /Users/ronanduddy/dev/prepair_original/PolygonRepair.h:24:
In file included from /Users/ronanduddy/dev/prepair_original/definitions.h:35:
In file included from /usr/local/include/ogrsf_frmts.h:34:
In file included from /usr/local/include/cpl_progress.h:33:
/usr/local/include/cpl_port.h:187:6: error: Must have C++11 or newer.
#    error Must have C++11 or newer.
     ^
1 error generated.
make[2]: *** [CMakeFiles/prepair.dir/PolygonRepair.cpp.o] Error 1
make[1]: *** [CMakeFiles/prepair.dir/all] Error 2
make: *** [all] Error 2

Cheers

ronanduddy commented 6 years ago

The error would go away if set (CMAKE_CXX_STANDARD 11) were to be added to CMakeLists.txt

violetaria commented 5 years ago

What OS were you using where that fix worked?

I'm on a Mac and I can't get the make files to work with GDAL 2.3.2

I get this error when I run make after modifying the CMakeLists.txt file

[ 25%] Linking CXX executable prepair
Undefined symbols for architecture x86_64:
  "OGRFeature::SetGeometry(OGRGeometry const*)", referenced from:
      PolygonRepair::saveToShp(OGRGeometry*, char const*) in PolygonRepair.cpp.o
  "OGRGeometryFactory::createFromWkt(char const**, OGRSpatialReference*, OGRGeometry**)", referenced from:
      OGRGeometryFactory::createFromWkt(char**, OGRSpatialReference*, OGRGeometry**) in prepair.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [prepair] Error 1
make[1]: *** [CMakeFiles/prepair.dir/all] Error 2
make: *** [all] Error 2
ronanduddy commented 5 years ago

Hi @violetaria, it was on macOS High Sierra that I was able to do this.. however I've now upgraded to Mojave and I'm getting an error when running make after modifying the CMakeLists.txt now too.

I'm sure there's someone out there with the c/c++ know-how to get this running with GDAL 2.3.x

kenohori commented 2 years ago

solved with v2