<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>I'm trying to compile GDAL-grass-plugin-2.0 against grass 7.<br><br></div>I have previously installed GDAL2.0 with out grass support. Then I have compiled grass 7 with no errors.<br><br></div>I'f I try to compile GDAL-grass-plugin wtih this configure<br><br><i>./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"</i><br><br></div>It compiles with out erros but when I do make command it give me this error:<br><i><br>lorenzo@lorenzo:~/gdal-grass-2.0.0$ make -j 4<br>g++ -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.cpp<br>g++ -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.cpp<br>g++ -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.cpp<br>g++ -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.cpp<br>grass57dataset.cpp:186:32: error: ‘GSpacing’ has not been declared<br>                                GSpacing nPixelSpace,<br>                                ^<br>grass57dataset.cpp:187:32: error: ‘GSpacing’ has not been declared<br>                                GSpacing nLineSpace,<br>                                ^<br>grass57dataset.cpp:188:32: error: ‘GDALRasterIOExtraArg’ has not been declared<br>                                GDALRasterIOExtraArg* psExtraArg);<br>                                ^<br>grass57dataset.cpp:534:8: error: ‘GSpacing’ has not been declared<br>        GSpacing nPixelSpace,<br>        ^<br>grass57dataset.cpp:535:20: error: ‘GSpacing’ has not been declared<br>                    GSpacing nLineSpace,<br>                    ^<br>grass57dataset.cpp:536:20: error: ‘GDALRasterIOExtraArg’ has not been declared<br>                    GDALRasterIOExtraArg* psExtraArg )<br>                    ^<br>In file included from ogrgrasslayer.cpp:32:0:<br>ogrgrass.h:58:25: error: conflicting return type specified for ‘virtual GIntBig OGRGRASSLayer::GetFeatureCount(int)’<br>     GIntBig             GetFeatureCount( int );<br>                         ^<br>In file included from ogrgrass.h:33:0,<br>                 from ogrgrasslayer.cpp:32:<br>/usr/include/gdal/ogrsf_frmts.h:95:25: error:   overriding ‘virtual int OGRLayer::GetFeatureCount(int)’<br>     virtual int         GetFeatureCount( int bForce = TRUE );<br>                         ^<br>ogrgrasslayer.cpp: In constructor ‘OGRGRASSLayer::OGRGRASSLayer(int, Map_info*)’:<br>ogrgrasslayer.cpp:90:46: error: ‘SetDescription’ was not declared in this scope<br>     SetDescription( poFeatureDefn->GetName() );<br>                                              ^<br>ogrgrasslayer.cpp:120:55: error: ‘wkbSetZ’ was not declared in this scope<br>         poFeatureDefn->SetGeomType ( wkbSetZ(eGeomType) );<br>                                                       ^<br>grass57dataset.cpp: In function ‘void GDALRegister_GRASS()’:<br>grass57dataset.cpp:1050:36: error: ‘GDAL_DCAP_RASTER’ was not declared in this scope<br>         poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" );<br>                                    ^<br>ogrgrasslayer.cpp: In member function ‘OGRFeature* OGRGRASSLayer::GetFeature(GIntBig)’:<br>ogrgrasslayer.cpp:790:82: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘GIntBig {aka long long int}’ [-Wformat=]<br>     CPLDebug ( "GRASS", "OGRGRASSLayer::GetFeature nFeatureId = %ld", nFeatureId );<br>                                                                                  ^<br>make: *** [grass57dataset.o] Error 1<br>make: *** Waiting for unfinished jobs....<br>make: *** [ogrgrasslayer.o] Error 1<br>In file included from ogrgrassdatasource.cpp:31:0:<br>ogrgrass.h:58:25: error: conflicting return type specified for ‘virtual GIntBig OGRGRASSLayer::GetFeatureCount(int)’<br>     GIntBig             GetFeatureCount( int );<br>                         ^<br>In file included from ogrgrassdriver.cpp:30:0:<br>ogrgrass.h:58:25: error: conflicting return type specified for ‘virtual GIntBig OGRGRASSLayer::GetFeatureCount(int)’<br>     GIntBig             GetFeatureCount( int );<br>                         ^<br>In file included from ogrgrass.h:33:0,<br>                 from ogrgrassdatasource.cpp:31:<br>/usr/include/gdal/ogrsf_frmts.h:95:25: error:   overriding ‘virtual int OGRLayer::GetFeatureCount(int)’<br>     virtual int         GetFeatureCount( int bForce = TRUE );<br>                         ^<br>In file included from ogrgrass.h:33:0,<br>                 from ogrgrassdriver.cpp:30:<br>/usr/include/gdal/ogrsf_frmts.h:95:25: error:   overriding ‘virtual int OGRLayer::GetFeatureCount(int)’<br>     virtual int         GetFeatureCount( int bForce = TRUE );<br>                         ^<br>ogrgrassdriver.cpp: In function ‘void RegisterOGRGRASS()’:<br>ogrgrassdriver.cpp:113:42: error: ‘GDALGetDriverByName’ was not declared in this scope<br>     if( GDALGetDriverByName( "OGR_GRASS" ) == NULL )<br>                                          ^<br>ogrgrassdriver.cpp:117:19: error: ‘class OGRGRASSDriver’ has no member named ‘SetDescription’<br>         poDriver->SetDescription( "GRASS" );<br>                   ^<br>ogrgrassdriver.cpp:118:19: error: ‘class OGRGRASSDriver’ has no member named ‘SetMetadataItem’<br>         poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );<br>                   ^<br>ogrgrassdriver.cpp:118:36: error: ‘GDAL_DCAP_VECTOR’ was not declared in this scope<br>         poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );<br>                                    ^<br>ogrgrassdriver.cpp:119:19: error: ‘class OGRGRASSDriver’ has no member named ‘SetMetadataItem’<br>         poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, <br>                   ^<br>ogrgrassdriver.cpp:119:36: error: ‘GDAL_DMD_LONGNAME’ was not declared in this scope<br>         poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, <br>                                    ^<br>ogrgrassdriver.cpp:121:19: error: ‘class OGRGRASSDriver’ has no member named ‘SetMetadataItem’<br>         poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, <br>                   ^<br>ogrgrassdriver.cpp:121:36: error: ‘GDAL_DMD_HELPTOPIC’ was not declared in this scope<br>         poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, <br>                                    ^<br>make: *** [ogrgrassdriver.o] Error 1<br>make: *** [ogrgrassdatasource.o] Error 1</i><br><br></div>Any suggestion to solve it?<br><br></div>Tnx<br><br></div>Lorenzo<br></div>