libpgeasy.h
| От | Kancha . |
|---|---|
| Тема | libpgeasy.h |
| Дата | |
| Msg-id | 20020406092442.89225.qmail@web14909.mail.yahoo.com обсуждение исходный текст |
| Ответы |
Re: libpgeasy.h
|
| Список | 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/
В списке pgsql-general по дате отправления: