Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-03

Postgresql unit

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Szymon Dowkontt

Hello

How to link programs with postgres unit? In README is written, that path to postgress libraries shud be placed in Makefile. But I completly don't know where place it in this file... :-(
Currently postgres unit will compile, but while compiling test programs, there will not link with error "/usr/bin/ld: cannot find -lpq".

Szymon

Unknown author

If you're using RedHat all you need to do is install the development libs for postgres (an RPM on the distro disks) or if you don't have the disks you can simply go to http://www.redhat.com and download the needed RPMS. I needed no additional setup when using the postgres libs. Other distros might be different though. (I am assuming you're using Linux from the DB and the error message you got)

- Matt

Szymon Dowkontt wrote 14 lines
Hello How to link programs with postgres unit? In README is written, that path to postgress libraries shud be placed in Makefile. But I completly don't know where place it in this file... :-( Currently postgres unit will compile, but while compiling test programs, there will not link with error "/usr/bin/ld: cannot find -lpq". Szymon _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Unknown author
to Szymon Dowkontt: Hello How to link programs with postgres unit? In README is written, that path to…
Szymon Dowkontt wrote 8 lines
Hello How to link programs with postgres unit? In README is written, that path to postgress libraries shud be placed in Makefile. But I completly don't know where place it in this file... :-( Currently postgres unit will compile, but while compiling test programs, there will not link with error "/usr/bin/ld: cannot find -lpq".

Add the path to libpq.so or libpq.a with the -Fl/path/to/it command-line option.

Michael.

Show quoted text 7 lines
Szymon _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Georgi Georgiev
to Szymon Dowkontt: Hello How to link programs with postgres unit? In README is written, that path to…
--- Szymon Dowkontt wrote
Hello

....

Show quoted text 7 lines
Currently postgres unit will compile, but while compiling test programs, there will not link with error "/usr/bin/ld: cannot find -lpq". Szymon

This message ocures when you have not installed libpq header files for your system (they are needed for
linker).

If you use Debian, execute as root the following:

apt-get install postgresql-dev

This command will install the C header files for libpq library !

=====
Skelet
====== http://skelet.hit.bg

__________________________________________________ Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Marco van de Voort
to Georgi Georgiev
Show quoted text 12 lines
> Szymon This message ocures when you have not installed libpq header files for your system (they are needed for linker). If you use Debian, execute as root the following: apt-get install postgresql-dev This command will install the C header files for libpq library !

It is probably the .a files that are needed, not the headers (.h)