[vtk-developers] VTK fails to compile with gdal2.0

Anatol Pomozov anatol.pomozov at gmail.com
Thu Sep 24 09:18:13 EDT 2015


I am trying to compile VTK with gdal 2.0 and got this compilation error:

[ 25%] Building CXX object
Wrapping/Python/CMakeFiles/vtkCommonDataModelPythonD.dir/vtkPointSetPython.cxx.o
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx: In
constructor 'vtkGDALVectorReader::Internal::Internal(const char*, int,
int, int)':
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:47:20: error:
'Open' is not a member of 'OGRSFDriverRegistrar'
     this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode,
&this->Driver );
                    ^
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx: In
destructor 'vtkGDALVectorReader::Internal::~Internal()':
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:64:22:
warning: 'static void
OGRDataSource::DestroyDataSource(OGRDataSource*)' is deprecated
[-Wdeprecated-declarations]
       OGRDataSource::DestroyDataSource( this->Source );
                      ^
In file included from
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:32:0:
/usr/include/ogrsf_frmts.h:245:25: note: declared here
     static void DestroyDataSource( OGRDataSource * )
OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:64:54:
warning: 'static void
OGRDataSource::DestroyDataSource(OGRDataSource*)' is deprecated
[-Wdeprecated-declarations]
       OGRDataSource::DestroyDataSource( this->Source );
                                                      ^
In file included from
/build/vtk/src/VTK-6.1.0/IO/GDAL/vtkGDALVectorReader.cxx:32:0:
/usr/include/ogrsf_frmts.h:245:25: note: declared here
     static void DestroyDataSource( OGRDataSource * )
OGR_DEPRECATED("Use GDALDataset class instead");
                         ^
IO/GDAL/CMakeFiles/vtkIOGDAL.dir/build.make:72: recipe for target
'IO/GDAL/CMakeFiles/vtkIOGDAL.dir/vtkGDALVectorReader.cxx.o' failed
make[2]: *** [IO/GDAL/CMakeFiles/vtkIOGDAL.dir/vtkGDALVectorReader.cxx.o]
Error 1
CMakeFiles/Makefile2:27630: recipe for target
'IO/GDAL/CMakeFiles/vtkIOGDAL.dir/all' failed
make[1]: *** [IO/GDAL/CMakeFiles/vtkIOGDAL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....



gdal 2.0 changed some API. Here is the list -
http://svn.osgeo.org/gdal/trunk/gdal/MIGRATION_GUIDE.TXT


More information about the vtk-developers mailing list