X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 157ECD1C96C for ; Sat, 22 Nov 2003 14:10:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 45959-08 for ; Sat, 22 Nov 2003 10:10:21 -0400 (AST) Received: from phpnet.org (195-137-249-122.ovanet.net [195.137.249.122]) by svr1.postgresql.org (Postfix) with SMTP id E360FD1CA8E for ; Sat, 22 Nov 2003 10:10:16 -0400 (AST) Received: (qmail 29904 invoked by uid 502); 22 Nov 2003 14:10:19 -0000 Received: from unknown (HELO moissac.leveque.fr) (81.56.193.138) by 10.0.0.2 with SMTP; 22 Nov 2003 14:10:19 -0000 Received: from net6d.com (IDENT:100@moissac.leveque.fr [192.168.150.177]) by moissac.leveque.fr (8.12.8/8.12.9/Bruno LEVEQUE - 31/08/2003) with ESMTP id hAME35YV021100; Sat, 22 Nov 2003 15:03:06 +0100 Message-ID: <3FBF6C99.6030701@net6d.com> Date: Sat, 22 Nov 2003 15:03:05 +0100 From: Bruno LEVEQUE User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030827 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ashok Chauhan Cc: pgsql-admin Subject: Re: ERROR References: <1069508871.1222.25.camel@chi> In-Reply-To: <1069508871.1222.25.camel@chi> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/383 X-Sequence-Number: 11370 Hi, Change your connect line with : conn = PQconnectdb("dbname='database'"); Bruno Ashok Chauhan wrote: ># include ># include >int main() >{ > int feild; > PGresult *result; > PGconn *conn; > conn = PQconnectdb("database"); > result = PQexec (conn, "select * from teblename"); > feild = PQntuples (result); > printf("%d",feild); > PQclear(result); > PQfinish (conn); > return (1); > >} > >I RUN THE ABOVE PROGRAM BUT IT GIVE SOME ERRORS THAT ARE FOLLOWS:- > >/tmp/ccApFcdl.o: In function `main': >/tmp/ccApFcdl.o(.text+0x19): undefined reference to `PQconnectdb' >/tmp/ccApFcdl.o(.text+0x2f): undefined reference to `PQexec' >/tmp/ccApFcdl.o(.text+0x40): undefined reference to `PQntuples' >/tmp/ccApFcdl.o(.text+0x64): undefined reference to `PQclear' >/tmp/ccApFcdl.o(.text+0x72): undefined reference to `PQfinish' >collect2: ld returned 1 exit status > >HELP ME > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > > -- Bruno LEVEQUE System Engineer SARL NET6D bruno.leveque@net6d.com http://www.net6d.com