C & C ++Program Problem

From: Arindam Haldar <arindamhaldar(at)hotpop(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: C & C ++Program Problem
Date: 2002-05-15 22:37:38
Message-ID: 3CE2E332.1040507@hotpop.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

hi all,
am trying to use C & C++ libraries with postgresql 7.2.
while compiling a sample programe(attached) there were thse errors
encounterd !..

[arindam(at)my src]$
[arindam(at)my src]$ gcc egTry.c
/tmp/ccTLiExh.o: In function `main':
/tmp/ccTLiExh.o(.text+0x12): undefined reference to `PQconnectdb'
/tmp/ccTLiExh.o(.text+0x2b): undefined reference to `PQstatus'
/tmp/ccTLiExh.o(.text+0x5c): undefined reference to `PQerrorMessage'
/tmp/ccTLiExh.o(.text+0xac): undefined reference to `PQexec'
/tmp/ccTLiExh.o(.text+0xc5): undefined reference to `PQresultStatus'
/tmp/ccTLiExh.o(.text+0xf3): undefined reference to `PQclear'
/tmp/ccTLiExh.o(.text+0x104): undefined reference to `PQfinish'
/tmp/ccTLiExh.o(.text+0x12e): undefined reference to `PQntuples'
/tmp/ccTLiExh.o(.text+0x159): undefined reference to `PQgetvalue'
/tmp/ccTLiExh.o(.text+0x186): undefined reference to `PQclear'
/tmp/ccTLiExh.o(.text+0x197): undefined reference to `PQfinish'
collect2: ld returned 1 exit status
[arindam(at)my src]$

lib & include dir are in /usr/lib/pgsql-7.2 & /usr/include/pgsql-7.2.
i have tried to compliethis programme with RH7.2(with postgres rpm & a
configured from tar file)..
i need help pls... i want to use C or C++
thanking u in advance
A.H

Attachment Content-Type Size
egTry1.c text/plain 3.2 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message jtv 2002-05-16 00:20:59 Re: [INTERFACES] C & C ++Program Problem
Previous Message Alan Wayne 2002-05-15 22:30:09 Please help regarding partial index

Browse pgsql-interfaces by date

  From Date Subject
Next Message jtv 2002-05-16 00:20:59 Re: [INTERFACES] C & C ++Program Problem
Previous Message Marc G. Fournier 2002-05-15 04:16:27 Re: 7.2.2 ?