pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno LEVEQUE <bruno.leveque@net6d.com>
To: Ashok Chauhan <ashok@kalculate.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: ERROR
Date: Sat, 22 Nov 2003 15:03:05 +0100
Message-ID: <3FBF6C99.6030701@net6d.com> (raw)
In-Reply-To: <1069508871.1222.25.camel@chi>
References: <1069508871.1222.25.camel@chi>

Hi,

Change your connect line with :

conn = PQconnectdb("dbname='database'");


Bruno



Ashok Chauhan wrote:

># 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
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>  
>

-- 
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque@net6d.com
http://www.net6d.com





view thread (18+ messages)  latest in thread

Message-ID: <3FBF6C99.6030701@net6d.com>
Permalink:  ../3FBF6C99.6030701@net6d.com/
Also on:    postgresql.org/message-id/3FBF6C99.6030701@net6d.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: bruno.leveque@net6d.com, ashok@kalculate.com
  Subject: Re: ERROR
  In-Reply-To: <3FBF6C99.6030701@net6d.com>

* 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