Recent

Author Topic: (SOLVED) Postgres dll  (Read 10326 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
(SOLVED) Postgres dll
« on: April 10, 2016, 05:49:50 pm »
Hello guys. I created a program that uses Zeoslib to access a postgres database. On the PC that installed the database (Linux) I have no problems and I connect. On Windows 8 instead I get the error: None of the dynamic libraries can be found or is not loadable: libpq.dll

Rightly he says that lack the dll. The problem arises here, I do not find. Postgres on the site are not there. Where the drain? Thank you
« Last Edit: April 11, 2016, 08:41:07 am by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: Postgres dll
« Reply #1 on: April 10, 2016, 06:08:55 pm »
In Zeos Trunk, have a look in lib\postgresql.  I note the dll's are named differently per version, so I'm guessing you take the version you need and rename to just libpq.dll.   Or set the dll name directly in the Connection from memory.

Update:  http://svn.code.sf.net/p/zeoslib/code-0/trunk/lib/postgresql/
« Last Edit: April 10, 2016, 06:11:19 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Postgres dll
« Reply #2 on: April 10, 2016, 06:39:28 pm »
Thank you. But my version is 9.3 and not exist in your list
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

miab3

  • Full Member
  • ***
  • Posts: 145
Re: Postgres dll
« Reply #3 on: April 10, 2016, 06:44:06 pm »
http://forum.lazarus.freepascal.org/index.php/topic,31964.msg205610.html#msg205610

I tried copy client libraries from PostgreSQL 9.5.1.1-32

zlib1.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
libxml2.dll
libxslt.dll
ssleay32.dll

in the application directory (ZEOS 7.2.1-rc, LAZARUS 1.6-Win32)
and connect to the server (9.3) without problems.

I see that it is also used msvcr120.dll.

Michal
« Last Edit: April 10, 2016, 09:02:31 pm by miab3 »

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Postgres dll
« Reply #4 on: April 11, 2016, 08:40:31 am »
Thank you very much
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

slivitin

  • New member
  • *
  • Posts: 7
Re: (SOLVED) Postgres dll
« Reply #5 on: August 02, 2016, 02:46:29 pm »
Can I use x64bit version of Lazarus (how to see it?) with x32bit of libpq.dll?
I have installed Lazarus x64 + pgAdmin 4 v1 (may be x64) but still get an error that say "libpq.dll wasn't found". I put path to libpq.dll (from pgAdmin directory) to the system "PATH"

slivitin

  • New member
  • *
  • Posts: 7
Re: (SOLVED) Postgres dll
« Reply #6 on: August 02, 2016, 03:27:11 pm »
Removed Lazarus x64 and installed Lazarus x32.
Now pgConnection is working...

miab3

  • Full Member
  • ***
  • Posts: 145
Re: (SOLVED) Postgres dll
« Reply #7 on: August 02, 2016, 03:50:55 pm »
You can use (mixed) 32-bit or 64-bit client and server, but the application must use suitable for himself client libraries. You can even use different OS.

 

TinyPortal © 2005-2018