Question

I'm trying to create my first application with Lazarus Pascal and PostgreSQL.

The pg database is on my Ubuntu Linux host. Lazarus is on XP, running through VirtualBox.

When trying to make a connection to the PG database, I get an error that libpq.dll is missing.

What should I do? Pretty new to this platform.

Was it helpful?

Solution

From the docs here http://wiki.lazarus.freepascal.org/postgres

Error: "Can not load PostgreSQL client library "libpq.dll"" The program cannot find your PostgreSQL driver files. Copy all required PostgreSQL .dll/.manifest files either to your project directory and your executable output directory, or to a directory in your search path (e.g. c:\windows\system32) A good example that demonstrates how to include drive DLL files when connecting Lazarus with PostgreSQL under Windows is easyDB. On Linux/Unix/OSX: make sure the PostgreSQL libraries are in your library search path, e.g.: On linux add the path to the libpq.so file to the libraries section in your /etc/fpc.cfg file. For example : -Fl/usr/local/pgsql/lib It may be necessary to create a symbolic link from a specific library version to a general library name: ln -s /usr/lib/pqsql.so.5 /usr/lib/pqsql.so . Alternatively, install the postgresql client -dev package using your distribution's package manager

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top