Modifying Makefile

From: "Mohamed Yassin Eltabakh" <meltabak(at)cs(dot)purdue(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Modifying Makefile
Date: 2006-10-14 17:51:58
Message-ID: 01b801c6efb9$7221be00$e9090a80@ad.cs.purdue.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tobias Brox 2006-10-15 09:52:59 Re: [PERFORM] autovacuum on a -mostly- r/o table
Previous Message vipin SS 2006-10-14 09:49:55 Postgre SQL Urgent Help