[gdal-dev] [gadl-dev][Grass-dev] Make error with grass 7 and Gdal-grass-plugin-2.0

Lorenzo Bottaccioli lorenzo.bottaccioli at gmail.com
Mon Jul 27 06:03:20 PDT 2015


Hi,

I'm trying to compile GDAL-grass-plugin-2.0 against grass 7.

I have previously installed GDAL2.0 with out grass support. Then I have
compiled grass 7 with no errors.

I'f I try to compile GDAL-grass-plugin wtih this configure

*./configure --prefix=/usr/local --with-gdal=/usr/bin/gdal-config
--with-grass=/usr/local/grass-7.0.0
--with-autoload="/usr/local/lib/gdalplugins/"  --with-ld-shared="g++
-shared"*

It compiles with out erros but when I do make command it give me this error:































































































*lorenzo at lorenzo:~/gdal-grass-2.0.0$ make -j 4g++ -Wall -fPIC  -DUSE_CPL
-DGRASS_GISBASE=\"/usr/local/grass-7.0.0\" -I/usr/include/gdal
-I/usr/local/grass-7.0.0/include   -O2   -c -o grass57dataset.o
grass57dataset.cppg++ -Wall -fPIC  -DUSE_CPL
-DGRASS_GISBASE=\"/usr/local/grass-7.0.0\" -I/usr/include/gdal
-I/usr/local/grass-7.0.0/include   -O2   -c -o ogrgrassdriver.o
ogrgrassdriver.cppg++ -Wall -fPIC  -DUSE_CPL
-DGRASS_GISBASE=\"/usr/local/grass-7.0.0\" -I/usr/include/gdal
-I/usr/local/grass-7.0.0/include   -O2   -c -o ogrgrassdatasource.o
ogrgrassdatasource.cppg++ -Wall -fPIC  -DUSE_CPL
-DGRASS_GISBASE=\"/usr/local/grass-7.0.0\" -I/usr/include/gdal
-I/usr/local/grass-7.0.0/include   -O2   -c -o ogrgrasslayer.o
ogrgrasslayer.cppgrass57dataset.cpp:186:32: error: ‘GSpacing’ has not been
declared                                GSpacing
nPixelSpace,                                ^grass57dataset.cpp:187:32:
error: ‘GSpacing’ has not been declared
GSpacing nLineSpace,
^grass57dataset.cpp:188:32: error: ‘GDALRasterIOExtraArg’ has not been
declared                                GDALRasterIOExtraArg*
psExtraArg);                                ^grass57dataset.cpp:534:8:
error: ‘GSpacing’ has not been declared        GSpacing nPixelSpace,
^grass57dataset.cpp:535:20: error: ‘GSpacing’ has not been
declared                    GSpacing nLineSpace,
^grass57dataset.cpp:536:20: error: ‘GDALRasterIOExtraArg’ has not been
declared                    GDALRasterIOExtraArg* psExtraArg
)                    ^In file included from
ogrgrasslayer.cpp:32:0:ogrgrass.h:58:25: error: conflicting return type
specified for ‘virtual GIntBig OGRGRASSLayer::GetFeatureCount(int)’
GIntBig             GetFeatureCount( int );                         ^In
file included from ogrgrass.h:33:0,                 from
ogrgrasslayer.cpp:32:/usr/include/gdal/ogrsf_frmts.h:95:25: error:
overriding ‘virtual int OGRLayer::GetFeatureCount(int)’     virtual
int         GetFeatureCount( int bForce = TRUE );
^ogrgrasslayer.cpp: In constructor ‘OGRGRASSLayer::OGRGRASSLayer(int,
Map_info*)’:ogrgrasslayer.cpp:90:46: error: ‘SetDescription’ was not
declared in this scope     SetDescription( poFeatureDefn->GetName()
);                                              ^ogrgrasslayer.cpp:120:55:
error: ‘wkbSetZ’ was not declared in this scope
poFeatureDefn->SetGeomType ( wkbSetZ(eGeomType)
);
^grass57dataset.cpp: In function ‘void
GDALRegister_GRASS()’:grass57dataset.cpp:1050:36: error: ‘GDAL_DCAP_RASTER’
was not declared in this scope         poDriver->SetMetadataItem(
GDAL_DCAP_RASTER, "YES" );
^ogrgrasslayer.cpp: In member function ‘OGRFeature*
OGRGRASSLayer::GetFeature(GIntBig)’:ogrgrasslayer.cpp:790:82: warning:
format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type
‘GIntBig {aka long long int}’ [-Wformat=]     CPLDebug ( "GRASS",
"OGRGRASSLayer::GetFeature nFeatureId = %ld", nFeatureId
);
^make: *** [grass57dataset.o] Error 1make: *** Waiting for unfinished
jobs....make: *** [ogrgrasslayer.o] Error 1In file included from
ogrgrassdatasource.cpp:31:0:ogrgrass.h:58:25: error: conflicting return
type specified for ‘virtual GIntBig
OGRGRASSLayer::GetFeatureCount(int)’     GIntBig
GetFeatureCount( int );                         ^In file included from
ogrgrassdriver.cpp:30:0:ogrgrass.h:58:25: error: conflicting return type
specified for ‘virtual GIntBig OGRGRASSLayer::GetFeatureCount(int)’
GIntBig             GetFeatureCount( int );                         ^In
file included from ogrgrass.h:33:0,                 from
ogrgrassdatasource.cpp:31:/usr/include/gdal/ogrsf_frmts.h:95:25: error:
overriding ‘virtual int OGRLayer::GetFeatureCount(int)’     virtual
int         GetFeatureCount( int bForce = TRUE );
^In file included from ogrgrass.h:33:0,                 from
ogrgrassdriver.cpp:30:/usr/include/gdal/ogrsf_frmts.h:95:25: error:
overriding ‘virtual int OGRLayer::GetFeatureCount(int)’     virtual
int         GetFeatureCount( int bForce = TRUE );
^ogrgrassdriver.cpp: In function ‘void
RegisterOGRGRASS()’:ogrgrassdriver.cpp:113:42: error: ‘GDALGetDriverByName’
was not declared in this scope     if( GDALGetDriverByName( "OGR_GRASS" )
== NULL )
^ogrgrassdriver.cpp:117:19: error: ‘class OGRGRASSDriver’ has no member
named ‘SetDescription’         poDriver->SetDescription( "GRASS"
);                   ^ogrgrassdriver.cpp:118:19: error: ‘class
OGRGRASSDriver’ has no member named ‘SetMetadataItem’
poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
^ogrgrassdriver.cpp:118:36: error: ‘GDAL_DCAP_VECTOR’ was not declared in
this scope         poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES"
);                                    ^ogrgrassdriver.cpp:119:19: error:
‘class OGRGRASSDriver’ has no member named ‘SetMetadataItem’
poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
^ogrgrassdriver.cpp:119:36: error: ‘GDAL_DMD_LONGNAME’ was not declared in
this scope         poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
                                    ^ogrgrassdriver.cpp:121:19: error:
‘class OGRGRASSDriver’ has no member named ‘SetMetadataItem’
poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
^ogrgrassdriver.cpp:121:36: error: ‘GDAL_DMD_HELPTOPIC’ was not declared in
this scope         poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC,
                                    ^make: *** [ogrgrassdriver.o] Error
1make: *** [ogrgrassdatasource.o] Error 1*

Any suggestion to solve it?

Tnx

Lorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150727/1fade8ca/attachment-0001.html>


More information about the gdal-dev mailing list