libpgeasy.h

From: "Kancha (dot)" <kancha2np(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: libpgeasy.h
Date: 2002-04-06 09:24:42
Message-ID: 20020406092442.89225.qmail@web14909.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using RH 7.2 with the default postgresql that
comes along (ver 7.1)

I'm trying to write a program usign libpgeasy. I wrote
a sample code just to get the feel and got following
error. I don't what it means. The program won't
compile with gcc.

-- code --#include <stdio.h>
#include <pgsql/libpq-fe.h>
#include <pgsql/libpgeasy.h>

int main(){
char loginName[20];
char sql[256];

connectdb("hostaddr=192.168.1.4 dbname=mydb
user=user password=password");
sprintf(sql, "select loginname from
cst_customer");
doquery(sql);

while(fetch(loginName) != END_OF_TUPLES)
printf("%s\n", loginName);

disconnectdb();

return 0;
}

-- error produced by gcc --

/tmp/cc3OLzfr.o: In function `main':
/tmp/cc3OLzfr.o(.text+0x12): undefined reference to
`connectdb'
/tmp/cc3OLzfr.o(.text+0x3b): undefined reference to
`doquery'
/tmp/cc3OLzfr.o(.text+0x4c): undefined reference to
`fetch'
/tmp/cc3OLzfr.o(.text+0x75): undefined reference to
`disconnectdb'
collect2: ld returned 1 exit status

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paulo Henrique Baptista de Oliveira 2002-04-06 10:11:14 Postgresql Strange Errror
Previous Message Tom Lane 2002-04-06 06:26:07 Re: Row locking inside a rule, is it possible?