Received: from nsyd01.arel.com.au ([203.32.92.1]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0ALRrB62141 for ; Wed, 10 Jan 2001 16:27:53 -0500 (EST) (envelope-from rbanks@arel.com.au) Received: from stretch.arel.com.au (unverified [203.32.92.3]) by nsyd01.arel.com.au (Rockliffe SMTPRA 4.5.4) with ESMTP id ; Thu, 11 Jan 2001 08:17:27 +1100 Message-Id: <5.0.0.25.0.20010111081859.00a55d10@mail.arel.com.au> X-Sender: rbanks@mail.arel.com.au X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Thu, 11 Jan 2001 08:28:22 +1100 To: Cedar Cox , Javier Reniz From: Richard Banks Subject: Re: Please help with PostgreSQL Cc: pgsql-interfaces@postgresql.org In-Reply-To: References: <20010109190312.23078.qmail@nwcst293> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_852551==_.ALT" X-Archive-Number: 200101/94 X-Sequence-Number: 703 --=====================_852551==_.ALT Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable > >On 9 Jan 2001, Javier Reniz wrote: > >I don=B4t know if the problem is about enviroment variables (I programming= as >root and/or Postgres user) or is the compilation instruction (gcc -o progr= am.c >program.o) try gcc -o program program.c -I/usr/include/pgsql -lpq You need the -lpq to tell the linker to reference libpq.so for the=20 postgresql calls. (and get rid of the .c in your output target unless you want to overwrite= =20 your source code) Richard. --=====================_852551==_.ALT Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

On 9 Jan 2001, Javier Reniz wrote:

I don=B4t know if the problem is about enviroment variables (I programming as
root and/or Postgres user) or is the compilation instruction (gcc -o program.c
program.o)

try gcc -o program program.c -I/usr/include/pgsql -lpq

You need the -lpq to tell the linker to reference libpq.so for the postgresql calls.
(and get rid of the .c in your output target unless you want to overwrite your source code)

Richard.
--=====================_852551==_.ALT--