From owner-freebsd-questions Thu Feb 20 7:33:26 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 B366E37B401 for ; Thu, 20 Feb 2003 07:33:24 -0800 (PST) Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by mx1.FreeBSD.org (Postfix) with SMTP id A022143F3F for ; Thu, 20 Feb 2003 07:33:23 -0800 (PST) (envelope-from mwm-dated-1046187202.244d20@mired.org) Received: (qmail 72419 invoked from network); 20 Feb 2003 15:33:22 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 20 Feb 2003 15:33:22 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15956.62785.172285.578609@guru.mired.org> Date: Thu, 20 Feb 2003 09:33:21 -0600 To: John Bleichert Cc: Jonathan Chen , freebsd Subject: Re: PosgreSQL from ports In-Reply-To: References: <20030220085957.GB80790@grimoire.chen.org.nz> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.69 (Count Fleet) 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 In , John Bleichert typed: > 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/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. http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message