Recent

Author Topic: "Cannot load PostgreSQL Client. Is it installed? (libpq.dll)" Yes, it is - error  (Read 19713 times)

wht244

  • Jr. Member
  • **
  • Posts: 79
i created a simple app to connect to PostgreSQL database. it works fine on system, where database is installed, but on the "clean" system i receive error: "Cannot load PostgreSQL Client. Is it installed? (libpq.dll)". libpq.dll and other required libs are in application directory.
libs in app directory:
Quote
libpq.dll
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
ssleay32.dll
msvcr71.dll
i cannot use ZEOS, because i need to my code be closed - ZEOS license forces opening part of code which uses that library (user MUST have possibility to use application with modified ZEOS library) - this makes ZEOS useless for me.

any ideas of how to solve this problem??

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Yes, it is installed... But is the PATH variable set to include the folder where the PostgreSQL dlls and exes are located?

The ZeosLib license is LGPL with static linking exception (http://en.wikipedia.org/wiki/GPL_linking_exception). It's supposed to be "commercial-application-friendly". See also http://zeos.firmos.at/viewtopic.php?t=1089&highlight=licence+license
« Last Edit: July 17, 2010, 05:20:48 pm by Troodon »
Lazarus/FPC on Linux

wht244

  • Jr. Member
  • **
  • Posts: 79
i tried to set PATH as you wrote, but it has no difference... the app still wants libpq.dll which is in its folder...

stonefull

  • Jr. Member
  • **
  • Posts: 54
copy libpq.dll to system32 folder

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Don't do that, there will be other libs that it won't find. My guess is that you did not edit the system PATH correctly. It's in Control Panel|System|Advanced System Settings|Environment Variables|System Variables|Path. Edit it to include the PostgreSQL bin directory then restart your computer.
Lazarus/FPC on Linux

wht244

  • Jr. Member
  • **
  • Posts: 79
Troodon: you mean: modify the PATH variable on system, where PostgreSQL server is installed? i don't have problem on that system. i have problem with system where Postgre is not installed. i know that installing and uninstalling postgre on that system will solve this problem, but when i want to distribute my app, that's not a good idea for users. i suppose they won't be happy to install Postgre on every computer they need to run the application...
//--
i noticed that the application is working on systems with xampp too...
//--
i tried to copy all libs from bin folder of the server and add the directory to PATH variable, the problem remains
« Last Edit: July 18, 2010, 08:11:01 am by wht244 »

wht244

  • Jr. Member
  • **
  • Posts: 79
done. i found what's wrong. libpq.dll needs
Quote
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
to work properly. after installation it works fine.

 

TinyPortal © 2005-2018