In <[EMAIL PROTECTED]>, John Bleichert 
> On Thu, 20 Feb 2003, Jonathan Chen wrote:
> > On Wed, Feb 19, 2003 at 09:14:27PM -0800, Syborg wrote:
> I'm trying to compile a very simple postgres app, from the samples, using 
> this simple Makefile:
> ~~
> CFLAGS=-Wall -I/usr/local/include -L/usr/local/lib
> pgtest: pgtest.c
>       gcc -o pgtest pgtest.c $(CFLAGS)
> ~~
> I use this setup to test the rig on my Linux box too. I get lots of linker 
> errors, the linker cannot find /usr/local/lib/ it looks like:
> ...
> /tmp/ccNOWnok.o(.text+0x2b8): undefined reference to `PQntuples'
> ...

You need to add -lpq to the CFLAGS so you actually use the postgres

Mike Meyer <[EMAIL PROTECTED]>    
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to