[Lazarus] Postgres Dlls not found

Michael Van Canneyt michael at freepascal.org
Fri May 30 09:08:16 CEST 2008



On Fri, 30 May 2008, dgcoventry at gmail.com wrote:

> On 5/29/08, Joost van der Sluis <joost at cnoc.nl> wrote:
> > You didn't mix up 64-bit and 32-bit dlls accidentally?
> 
> Well I installed pgadmin3 on the machine and it runs.
> 
> I copied ALL 18 dlls from the C:\Program Files\pgadminIII\ Directory
> into System32\ and, when I start my app it generates an error message
> asking for libpg.dll.

Try to copy the libraries in the directory of your application.

The procedure to load the library uses a straight windows loadLibrary call,
as can be seen from the following:

Procedure InitialiseDllist;

begin
  inc(RefCount);
  if RefCount = 1 then
    begin
    DllistLibraryHandle := loadlibrary(pqlib);
    if DllistLibraryHandle = nilhandle then
      begin
      RefCount := 0;
      Raise EInOutError.Create('Can not load PosgreSQL client. Is it installed? ('+pqlib+')');
      end;

So normally it should find it.

Michael.



More information about the Lazarus mailing list