[gdal-dev] GDAL 1.5.0 (RC2) Binaries
Howard Butler
hobu.inc at gmail.com
Wed Dec 26 23:08:41 EST 2007
On Dec 26, 2007, at 9:29 PM, Martin Chapman wrote:
> Howard,
>
> How do the plugins work? Do you compile the plugin against the driver
> library and then distribute the driver and it only loads if the
> dependent
> format driver is present on the users machine? Thanks for whatever
> insight
> you have time to provide.
The plugins work by linking the driver specific code (mrsid, ECW,
ArcSDE, whatver) into its own dll (for example ogr_SDE.dll -- the OGR
ArcSDE driver) and then linking that against both the gdal15.dll and
any driver-specific libraries that the driver might need.
Taking the OGR SDE driver, it links against gdal15.dll, sde91.dll, and
sg91.dll (maybe a few others too). When you put this in the
gdalplugins directory, or override the location where GDAL should look
with GDAL_DRIVER_PATH, GDAL will recognize the plugin dll because of
the naming convention and dynamically load and register the driver at
runtime.
Of course, this only works if the requisite dlls that ogr_SDE.dll (The
ArcSDE SDK dlls) are available on the path to be loaded at runtime.
If it can't, you'll sometimes get some rather cryptic error messages.
I've found the best way to diagnose missing dll loading problems is to
run from a cmd.exe, where Windows doesn't swallow the popup window
saying which dll it can't find.
All of the above should apply to .so's on Linux/OSX as well, without
the Windows misery :) Of course, building your own on these
environments isn't as challenging or aggravating, so the plugin
mechanism isn't as compelling.
Howard
More information about the gdal-dev
mailing list