From owner-freebsd-questions Thu Feb 20 7:45:46 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACB6837B401 for ; Thu, 20 Feb 2003 07:45:44 -0800 (PST) Received: from janeway.vonbek.dhs.org (bgm-24-94-58-56.stny.rr.com [24.94.58.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2835A43FB1 for ; Thu, 20 Feb 2003 07:45:44 -0800 (PST) (envelope-from syborg@stny.rr.com) Received: by janeway.vonbek.dhs.org (Postfix, from userid 507) id 0E1FE4FA7E; Thu, 20 Feb 2003 10:32:35 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by janeway.vonbek.dhs.org (Postfix) with ESMTP id 066704868; Thu, 20 Feb 2003 10:32:35 -0500 (EST) Date: Thu, 20 Feb 2003 10:32:34 -0500 (EST) From: John Bleichert X-X-Sender: syborg@janeway.vonbek.dhs.org Reply-To: John Bleichert To: Mike Meyer Cc: freebsd Subject: Re: PosgreSQL from ports In-Reply-To: <15956.62785.172285.578609@guru.mired.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. > >