Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2003 10:32:34 -0500 (EST)
From:      John Bleichert <syborg@stny.rr.com>
To:        Mike Meyer <mwm-dated-1046187202.244d20@mired.org>
Cc:        freebsd <freebsd-questions@FreeBSD.ORG>
Subject:   Re: PosgreSQL from ports
Message-ID:  <Pine.LNX.4.44.0302201028400.20850-100000@janeway.vonbek.dhs.org>
In-Reply-To: <15956.62785.172285.578609@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 20 Feb 2003, Mike Meyer wrote:
> Subject: Re: PosgreSQL from ports
> > On Thu, 20 Feb 2003, Jonathan Chen 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/libpq.so 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
> library.
> 
> 	<mike

Doh! I had tried that, but without the '-L' line provided above. Both are 
required for the build. Hmm.

Thanks for the whack with the reason stick ;)

JB


#  John Bleichert 
#  http://vonbek.dhs.org/latest.jpg


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44.0302201028400.20850-100000>