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 3BE28D1C96C for ; Sat, 22 Nov 2003 13:41:58 +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 44828-01 for ; Sat, 22 Nov 2003 09:41:30 -0400 (AST) Received: from chi.greatindianproducts.com (unknown [61.16.132.195]) by svr1.postgresql.org (Postfix) with ESMTP id F35DDD1B575 for ; Sat, 22 Nov 2003 09:41:19 -0400 (AST) Received: from chi.greatindianproducts.com (chi.greatindianproducts.com [127.0.0.1]) by chi.greatindianproducts.com (8.12.5/8.12.5) with ESMTP id hAMDm6v7018186 for ; Sat, 22 Nov 2003 19:18:06 +0530 Received: (from ashok@localhost) by chi.greatindianproducts.com (8.12.5/8.12.5/Submit) id hAMDlqU5018181; Sat, 22 Nov 2003 19:17:52 +0530 X-Authentication-Warning: chi.greatindianproducts.com: ashok set sender to ashok@kalculate.com using -f Subject: ERROR From: Ashok Chauhan To: pgsql-admin Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Date: 22 Nov 2003 19:17:51 +0530 Message-Id: <1069508871.1222.25.camel@chi> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/382 X-Sequence-Number: 11369 # 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