compile error

From: "rony khoury" <rkhoury(at)apotres(dot)edu(dot)lb>
To: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: compile error
Date: 1998-06-30 07:23:00
Message-ID: 35989254.597B3750@apotres.edu.lb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

hello ,

can somebody explain to me why when I compile the following program i do
not know
how to link the libraries to c .

---------------------

#include <stdio.h>
#include "libpq-fe.h"

void exit_nicely(PGconn* conn)
{
PQfinish(conn);
exit(1);
}

main()
{
printf("\nThe End\n") ;
}

-----------------------
I get the following error

tmp/cca006421.o: In function `exit nicely'
tmp/cca006421.o(.text+0x8): undefined reference to `PQfinish'

Thanks ,
Rony .

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Herouth Maoz 1998-06-30 08:50:22 Re: [INTERFACES] compile error
Previous Message David Hartwig 1998-06-29 18:45:16 Re: [INTERFACES] scrollable cursor via odbc