Flemming Froekjaer wrote:
>I'm trying to compile a small c program that integrates with PostgreSQL,
>
>but when I get to link the prog i get the following error.
>
>/tmp/ccFrRISc.o: In function `main':
>/tmp/ccFrRISc.o(.text+0x57): undefined reference to `PQsetdbLogin'
It seems that you aren't in fact linking libpq to your program.
You need something like
gcc prog.c -L/usr/local/lib/pgsql -lpq
as a minimum.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"But the wisdom that is from above is first pure, then
peaceable, gentle, and easy to be intreated, full of
mercy and good fruits, without partiality, and without
hypocrisy." James 3:17