ERROR - Mailing list pgsql-admin

From Ashok Chauhan
Subject ERROR
Date
Msg-id 1069508871.1222.25.camel@chi
Whole thread Raw
Responses Re: ERROR
Re: ERROR
List pgsql-admin
# include <stdlib.h>
# include <libpq-fe.h>
int main()
{
        int feild;
        PGresult *result;
        PGconn *conn;
        conn = PQconnectdb("database");
        result = PQexec (conn, "select * from teblename");
        feild = PQntuples (result);
        printf("%d",feild);
        PQclear(result);
        PQfinish (conn);
        return (1);

}

I RUN THE ABOVE PROGRAM BUT IT GIVE SOME ERRORS THAT ARE FOLLOWS:-

/tmp/ccApFcdl.o: In function `main':
/tmp/ccApFcdl.o(.text+0x19): undefined reference to `PQconnectdb'
/tmp/ccApFcdl.o(.text+0x2f): undefined reference to `PQexec'
/tmp/ccApFcdl.o(.text+0x40): undefined reference to `PQntuples'
/tmp/ccApFcdl.o(.text+0x64): undefined reference to `PQclear'
/tmp/ccApFcdl.o(.text+0x72): undefined reference to `PQfinish'
collect2: ld returned 1 exit status

HELP ME

pgsql-admin by date:

Previous
From: Ashok Chauhan
Date:
Subject: re-install postgresql
Next
From: Bruno LEVEQUE
Date:
Subject: Re: ERROR