Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 49F879FB463 for ; Sat, 14 Oct 2006 15:11:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 16517-03 for ; Sat, 14 Oct 2006 18:10:44 +0000 (UTC) X-Greylist: delayed 00:19:05.09716 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id D14739FB43E for ; Sat, 14 Oct 2006 15:10:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mailhub129.itcs.purdue.edu (mailhub129.itcs.purdue.edu [128.210.5.129]) by svr4.postgresql.org (Postfix) with ESMTP id 75D2E5AF884 for ; Sat, 14 Oct 2006 17:51:38 +0000 (GMT) Received: from ICDS36 (icds36.cs.purdue.edu [128.10.9.233]) by mailhub129.itcs.purdue.edu (8.13.7/8.13.7/internal-smtp) with SMTP id k9EHpZCp004898 for ; Sat, 14 Oct 2006 13:51:35 -0400 Message-ID: <01b801c6efb9$7221be00$e9090a80@ad.cs.purdue.edu> From: "Mohamed Yassin Eltabakh" To: Subject: Modifying Makefile Date: Sat, 14 Oct 2006 13:51:58 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2905 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-PMX-Version: 5.1.2.240295 X-PerlMx-Virus-Scanned: Yes X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/127 X-Sequence-Number: 23430 I'm modifying postgreSQL code and adding a new file (say new.c) under dir "src/backend/parser". This file calls functions (PSQLexec, PQntuples, PQgetvalue, ...). The file looks like: -------------------------------- #include "libpq-fe.h" #include "common.h" bool exec_sql() { PGresult *res; char str[1000]; int TuplesNums; strcpy(str, "SELECT id, fname FROM T;"); res = PSQLexec(str, false); if (!res) return false; TuplesNums = PQntuples(res); PQclear(res); return true; } ------------------------- I updated the src/backend/parser/Makefile and added "new.o" to the OBJS list, but when I compile I receive error: ....undefined reference to `PSQLexec' ....undefined reference to `PQntuples' ....undefined reference to `PQclear' Do you have an idea which Makefile should I update and how? because I'm not familiar with writing Makefiles. Thanks in advance