Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

Error getting ESRI Shapefile driver OGR in C++

$
0
0

I am unable to create an OGR Layer using the C++ API. I have followed the documentation at this link exactly http://www.gdal.org/ogr_apitut.html
I get an error trying to get the shapefile driver. Any suggestions?
const char *driverName = “ESRI Shapefile”;
GDALDriver *pDriver;

GDALAllRegister();

pDriver = GetGDALDriverManager()->GetDriverByName(driverName);
if (pDriver == NULL)
{
    qDebug()<<"Error loading driver"; // this error happens
}   

Viewing all articles
Browse latest Browse all 397

Trending Articles