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 C5BAED1B439 for ; Mon, 8 Dec 2003 13:46:14 +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 23386-04 for ; Mon, 8 Dec 2003 09:45:47 -0400 (AST) Received: from chi.greatindianproducts.com (unknown [61.16.132.195]) by svr1.postgresql.org (Postfix) with ESMTP id 295F8D1B433 for ; Mon, 8 Dec 2003 09:45:23 -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 hB8DtV05005474 for ; Mon, 8 Dec 2003 19:25:32 +0530 Received: (from ashok@localhost) by chi.greatindianproducts.com (8.12.5/8.12.5/Submit) id hB8DtVuh005472; Mon, 8 Dec 2003 19:25:31 +0530 X-Authentication-Warning: chi.greatindianproducts.com: ashok set sender to ashok@kalculate.com using -f Subject: error in code 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: 08 Dec 2003 19:25:30 +0530 Message-Id: <1070891730.1268.18.camel@chi> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/87 X-Sequence-Number: 11595 hi ********************************* # include # include # include # include int main() { PGresult *result; PGconn *conn; int feild; conn = PQconnectdb ("ashok"); result = PQexec (conn, "select * from bill"); feild = PQntuples (result); printf("%d",feild); PQclear (result); PQfinish (conn); printf("hello"); return 1; } I make the following code with the make command but give the following the errors:- /tmp/ccUWs9W9.o: In function `main': /tmp/ccUWs9W9.o(.text+0x19): undefined reference to `PQconnectdb' /tmp/ccUWs9W9.o(.text+0x2f): undefined reference to `PQexec' /tmp/ccUWs9W9.o(.text+0x40): undefined reference to `PQntuples' /tmp/ccUWs9W9.o(.text+0x64): undefined reference to `PQclear' /tmp/ccUWs9W9.o(.text+0x72): undefined reference to `PQfinish' collect2: ld returned 1 exit status make: *** [aa] Error 1 plz help me.