On 16 July 2012 10:10, taibc <
[hidden email]> wrote:
> I am trying to use OGR classes on VS2010 to read and write from file as the
> link:
>
http://gdal.org/ogr/ogr_apitut.html>
> But I got an error, please see attached screenshot for details.
>
>
http://osgeo-org.1560.n6.nabble.com/file/n4988534/error.pngYour pointer poLayer is NULL.
Perhaps the layer you want could not be found by given name
and this call returns NULL:
poLayer = poDS->GetLayerByName(...)
Just check:
if( poLayer == NULL )
{
printf( "Layer not found.\n" );
exit( 1 );
}
> Do you know this error ?
http://en.wikipedia.org/wiki/Segmentation_fault#Segmentation.2C_page_fault.2C_and_access_violationI'd recommend you to get a good C/C++ book.
Best regards,
--
Mateusz Loskot,
http://mateusz.loskot.net_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev