Re: Dropping dlopen/LoadLibrary loading of proj.4 ?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Dropping dlopen/LoadLibrary loading of proj.4 ?

Alexander Mohr
actually, even more importantly the reason to drop this is because it is wrong on linux.  When building gdal it will link to a specific version of libproj (ex, with the current implementation, at runtime it will try to load  This does not existing in non -dev packages on purpose because it expects you to have a hard dependency to a versioned library so you won't accidentally load a version that's incompatible.

If a dynamic load is to be performed, it needs to remember the version that it was linked against, and not try to load the dev version.

Furthermore, the only reason to dynamically load the library is if it may not be available, but there currently is no fallback, you get an error that it can't load

So in fact the current implementation is broken in two ways.  It should just have a hard linker dependency against and if needed a flag that will cause all the methods to either not be available, or throw an exception if it was built w/o libproj support.
gdal-dev mailing list
[hidden email]