[Gdal-dev] gdal13.dll fails to load if called from different directory (WinXP) - GIF format only

Sergey Malgin smalgin at esri.com
Mon Jan 23 17:29:12 EST 2006


Ok, it sounds a bit confusing. Let me explain:

 

1.	I have FOO_PLUGIN DLL that uses GDAL to read images 
2.	FOO_DLL is located under PLUGINS/FOO and loaded on-the-fly by the
process 
3.	GDAL13.DLL sits in DGAL_DIR. PATH variable has GDAL_DIR listed. 

 

It all works OK for ECW, TIFF and MrSID. However, when I try to load GIFs,
LoadLibrary(FOO_PLUGIN.DLL) fails with Win32 code 126 (library couldn't be
found) and pop-up appears - 'GDAL13.DLL was not found'. 

When I copy GDAL13.DLL into my process' working dir, it starts to complain
about HD420M.DLL etc etc. 

All these DLLs are in GDAL_DIR together and yes, GDAL_DIR is listed in PATH.


 

Again, this only happens when I try to read GIFs. ECW, TIFF and MrSID
formats work OK.

 

I suppose I somehow should tell GDAL where GDAL13.DLL is located. But how? I
couldn't find anything in documentation. 

 

This is my GDAL initialization code from FOO_PLUGIN.DLL:

 

    GDALAllRegister();

    CPLSetConfigOption("GDAL_PAM_ENABLED", "YES");

    CPLSetConfigOption("USE_RRD", "YES");

CPLSetConfigOption("HFA_USE_RRD", "YES");

 

 

Any help would be greatly appreciated.

 

Sergey Malgin

ESRI, Inc

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060123/e5b0ac86/attachment.html


More information about the Gdal-dev mailing list