[gdal-dev] Adding driver in run time

Even Rouault even.rouault at mines-paris.org
Mon Dec 9 12:00:22 PST 2013


Le dimanche 08 décembre 2013 17:31:43, Victor Fine a écrit :
> Hello,
> 
> I'm trying to write a driver , inside my program that uses GDAL (C++).
> 
> After the call to GDALAllRegister(); I call GDALRegister_MYDEM(),
> which is much like in the example in
> http://www.gdal.org/gdal_drivertut.html
> 
> After that, I try to call GDALOpen on some file and the breakpoint in
> the .. *MYDEMDataset::Open(...) function is not even hit.
> (And , of course, I get a message that this is not a recognized format).
> 
> It seems that I have some beginners mistake here - why does GDAL
> ignores my driver?

If the application compiles, links and runs, nothing immediately strikes me as 
a potential error, but perhaps you could enumerate all the registered drivers 
and check if yours is listed ?

for(i=0;i<GDALGetDriverCount();i++)
	printf("driver %d: %s\n", i, GDALGetDriverShortName(GDALGetDriver(i)));

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list