fli:register-module & dll dependencies
Hello,
I’m trying to register a foreign language interface for the libpq.dll of PostgreSQL 9.5 – 32bits.
This dll seems to depend on 4 other dlls: libeay32.dll, libiconv-2.dll, libintl-8.dll, ssleay32.dll.
All dlls can be found together in the same folder <PostgreSQL Folder>/9.1/bin.
I managed to make it work by copying all 5 dlls to a seperate folder then adding this folder’s path to the PATH environement variable of my system. The command is then simply :
(fli:register-module "pgsql" :real-name "libpq.dll" :connection-style :immediate)
However, if i remove the folder’s path from my PATH environement variable and use the command :
(fli:register-module "pgsql" :real-name "<folder absolute path>/libpq.dll" :connection-style :immediate)
I receive an Error: Could not register handle for external module "pgsql".
Having to change the PATH environement variable of the systems my application will be deployed on… well they won’t let me do it. Is there a way to make it work without it ?
Note : for experiment sake, you can move libpq.dll to a separate folder and try registering it with it’s path… this will produce the same error. However, adding back the path of the folder containing the 4 other dlls to the PATH environement variable will make the registration work again.
I suspect the problem is either in how Windows handle dll dependencies or how fli:register-module does it… or even in how the dependencies are defined in libpq.dll …
Thank you for your help.
Jérémie Daelen
Configuration :
LispWorks 6.1.1 Enterprise Edition - 32 bits
Windows 10 - 64 bits