[Lazarus] Error: Can not load PostgreSQL Client library "libpq.dll".
reinierolislagers at gmail.com
Tue Oct 2 20:12:06 CEST 2012
On 2-10-2012 12:08, Marc Weustink wrote:
> Ludo Brands wrote:
>>> The library has been installed and copied to the project file.
>> Libpq.dll has many dependencies. Probably one of them is not
>> satisfied. Here
>> is the list of files I needed to copy on a wine system to get libpq.dll
> Don't copy around dll files. This makes the mess worse. Make sure the
> postgres bin folder is part of your user/system path.
Unless you use an incompatible set of dlls in your postgres bin folder.
What's wrong with distributing known good/tested dll files to the
*program directory* (or project/Lazarus dir when developing)? That way,
they won't interfere with any existing DLLs in windows.
Yes, I know it interferes with the concept of actually sharing DLL but
it avoids versioning issue.
Also, IIRC, Windows Vista+ has some issue to provide side-by-side DLL
installation, so copying dlls to the windows system directory may again
be allowed; haven't looked at that.
> A problem we encouter lately is that other software vendors come with an
> outdated ssleay32.dll, which they put in sytem32 or int the path before
> postgres. simply deleting the outdated ssleay32.dll will solve the issue
> (as long as the postgres version is in the path)
Now you may have broken the other vendor's ssleay32 (if the newer
version has regressions).
I'd rather copy over dlls to my application's directory than try to mess
with system dlls.
Just my 2 cents.
More information about the Lazarus