From: Mohamed Yassin Eltabakh <meltabak@cs.purdue.edu>
To: pgsql-admin@postgresql.org
Subject: Modifying Makefile
Date: Sat, 14 Oct 2006 13:51:58 -0400
Message-ID: <01b801c6efb9$7221be00$e9090a80@ad.cs.purdue.edu> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: meltabak@cs.purdue.edu
Subject: Re: Modifying Makefile
In-Reply-To: <01b801c6efb9$7221be00$e9090a80@ad.cs.purdue.edu>
References: <01b801c6efb9$7221be00$e9090a80@ad.cs.purdue.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox