Selon Dmitriy Baryshnikov <[email protected]>: > Hi, > > Yesterday I faced interesting problem on Win7 64 bit. > My program uses last gdal version 1.12. During start the error message > popuped in dialog that gdal v. 1.8 was not find and application closed. > I checked with dependency walker what were was no gdal 1.8 dependency in > application and all it dll's. > I found out that another program used the gdal 1.8 was installed on > that PC. And this program create env variable GDAL_DRIVER_PATH which > pointed on some non standard driver linked with gdal 1.8 > My gdal 1.12 try to load this driver as GDAL_DRIVER_PATH was present and > crush as it was linked with gdal 1.8. > I solved it by setting CPLSetConfigOption("GDAL_DRIVER_PATH", > "disabled"); in my application, but this is not a good solution. > I think some version checking needed or something else. Anyhow I think > this is bug. > That do you think about this? > If this is a bug I'll create ticket.
I don't think there's a way to prevent this. GDAL 1.12 will logically try to load drivers that are in GDAL_DRIVER_PATH, and if the plugins in there link with any DLL, the Windows mechanisms will try to load that DLL. Well, perhaps there's a way of putting some "metadata" in the DLL that you could inspect before loading it, but I don't know Windows well enough to tell. > > -- > Best regards, > Dmitry > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
