[gdal-dev] GDAL_DRIVER_PATH dll hell

Dmitriy Baryshnikov bishop.dev at gmail.com
Fri May 16 00:09:57 PDT 2014


Hi Andre,

The solution you proposed is something special. In common case this is 
library responsible to solve such situation.
Following you logic, the gdal have to deny using global environment 
variable GDAL_DRIVER_PATH and require that each developer set this 
variable manually in code or input parameters. So all developers play 
using the same rules.
Currently the developers can add to GDAL_DRIVER_PATH own incompatible 
drivers and all gdal libraries in PC will not work.

Maybe this is good idea to prevent using global environment variable 
GDAL_DRIVER_PATH, but I'm not sure that CPL config options support this 
behavior. It seem to me that CPLGetConfigOption take the global 
environment variable if the value is not present in the config, and 
where is no way to prevent this.

I call for solution to set such gdal behavior, when developers cannot 
crush gdal installations of each others.

Best regards,
     Dmitry

15.05.2014 18:47, Andre Joost пишет:
> Am 15.05.2014 12:07, schrieb Dmitriy Baryshnikov:
>
>> 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
>
>> 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.
>>
>
> The gdal packages from gisinternals.com sets this variable when you 
> start the SDKShell.bat to open a command window. The variable gets 
> destroyed when the cmd window is closed.
> OSGEO4W does the same, setting the path to its own location.
>
> You could do the same, either in your application or in a bat arround 
> it. For the first choice, you could restore the path variable when you 
> exit your application.
>
> HTH,
> André Joost
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>



More information about the gdal-dev mailing list