nadams,
You don't need to instantiate a driver manager. Also you are using the 2.0 unified driver model for GDAL and OGR, but you stated verson 1.11.1 in the ticket.
See the docs here for 1.x:
http://gdal.org/1.11/index.html
If you are using the trunk (2.0dev), then this should work:
#include "gdal.h"
#include "gdal_priv.h"
int main(int argc, char *argv[])
{
GDALAllRegister();
GDALDriver *poDriver = (GDALDriver*) GDALGetDriverByName("ESRI Shapefile");
if( poDriver == NULL )
std::cerr << "ESRI Shapefile driver not available.\n" << std::endl;
GDALDataset* poDS = (GDALDataset*) GDALOpen( "Political_VotingPrecincts.shp", GA_ReadOnly );
if( poDS == NULL )
std::cerr << "Open failed.\n" << std::endl;
return 0;
}
If you are using 1.x, you need to use the OGR API for vector datasources (cut from the ogr tutorial):
#include "ogr_api.h"
int main()
{
OGRRegisterAll();
OGRDataSourceH hDS;
hDS = OGROpen( "point.shp", FALSE, NULL );
if( hDS == NULL )
{
printf( "Open failed.\n" );
exit( 1 );
}
/* ... */
return 0;
}