Can not load PostgreSQL client. Is it installed? (libpq.dll) lazarus / 16-Databases ---------------------------------------------------------------------- j0x · 2011-12-24 00:11 im on windows 7 64 bit and got lazarus 0.9.30.2RC2 and im starting to venture on database programming since i want to be productive on my current work i googled this error already and found some tips like installing visual c++ resdistributable runtime 2005 and adding the postgresql bin folder to the system path but none of them work the tutorial im following is this one -> http://wiki.lazarus.freepasca l.org/Lazarus_Database_Tutorial#Lazarus_and_PostgreSQL and is their further more examples of how to do database programming in Lazarus? im noob on this so i hope you use laymans terms, thanks ---------------------------------------------------------------------- Troodon · 2011-12-24 04:04 The postgresql bin folder must be in the system %PATH% variable; then reboot. ---------------------------------------------------------------------- j0x · 2011-12-24 05:42 Quote from: Troodon on December 24, 2011, 05:04:33 amThe postgresql bin folder must be in the system %PATH% variable; then reboot. ive done that already but same error im setting the Connected property of TPQConnection to True at design time and i got this error ---------------------------------------------------------------------- Leledumbo · 2011-12-24 07:18 I never use the installer so I'm not sure for it. When building PostgreSQL from source, some additional options are required to make the build script put the generated .dlls to bin folder. By default, they're put into lib folder. Please verify this. Basically what you need to add to PATH is the folder containing libpq.dll. If that doesn't work, try copying it to lazarus folder (where lazarus.exe resides). ---------------------------------------------------------------------- ludob · 2011-12-24 08:10 Since you are on Win7 64 bit make also sure that libpq.dll is 64 bit, assuming you use the 64bit compiler. Also libpq has a dependency on ssleay32.dll and a library can only load if all its dependencies can be loaded. Despite its name, there exists also a 64 bit version. Download it from the "official" openssl windows binary maintainer http://www.slproweb.com/products/Win32OpenSSL.html. Select "Win64 OpenSSL v1.0.0e" but first download and install "Visual C++ 2008 Redistributables (x64)" (link on the same page). ---------------------------------------------------------------------- j0x · 2011-12-24 13:56 Quote from: ludob on December 24, 2011, 09:10:36 amSince you are on Win7 64 bit make also sure that libpq.dll is 64 bit, assuming you use the 64bit compiler i only downloaded and installed this 32-bit version -> lazarus-0.9.30.2RC2-fpc-2.4.4-win32.exe but the postgresql i installed is 64-bit version so is their a conflict their? do i have to download a 64-bit lazarus installer? Quote from: ludob on December 24, 2011, 09:10:36 amAlso libpq has a dependency on ssleay32.dll and a library can only load if all its dependencies can be loaded. Despite its name, there exists also a 64 bit version. Download it from the "official" openssl windows binary maintainer http://www.slproweb.com/products/Win32OpenSSL.html. Select "Win64 OpenSSL v1.0.0e" but first download and install "Visual C++ 2008 Redistributables (x64)" (link on the same page). openSSL has this libpq.dll too? and i already have this Microsoft Visual C++ 2008 Redistributable x64 installed ---------------------------------------------------------------------- ludob · 2011-12-24 17:13 Quotei only downloaded and installed this 32-bit version -> lazarus-0.9.30.2RC2-fpc-2.4.4-win32.exe but the postgresql i installed is 64-bit version so is their a conflict their? do i have to download a 64-bit lazarus installer?You can continue to use lazarus-0.9.30.2RC2-fpc-2.4.4-win32.exe but it will create 32-bit programs. They'll run on both win64 and win32. But know that you'll need 32 bit libraries for whatever you do. Windows itself ships both 32 and 64 bit versions on win64 but external programs don't always. So for 32 bit programs you need the 32 bit libpq. The easiest is to install pgAdmin. It is a good tool to administer your database and comes with all the client libraries needed. If you can run pgAdmin and contact your database you are on the correct path You'll find libpq.dll and its dependent dll's after a default installation in c:\Program Files (x86)\pgAdmin III\1.14\. Copy them all to you project directory or to a dir in your path or add the pgAdmin dir to the path. Note that 32 bit dll's go to \windows\sysWOW64 (not \windows\system32). Windows 64 maps in the background \windows\system32 to \windows\sysWOW64 for 32 bit programs. QuoteopenSSL has this libpq.dll too? and i already have this Microsoft Visual C++ 2008 Redistributable x64 installed No, it is the other way around. libpq needs openssl. It uses it for encrypting data over the network. pgAdmin comes with the correct version of ssleay32.dll and libeay32.dll (openssl libraires).