compile error - Mailing list pgsql-interfaces

From rony khoury
Subject compile error
Date
Msg-id 35989254.597B3750@apotres.edu.lb
Whole thread Raw
Responses Re: [INTERFACES] compile error  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List 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 .



pgsql-interfaces by date:

Previous
From: David Hartwig
Date:
Subject: Re: [INTERFACES] scrollable cursor via odbc
Next
From: Herouth Maoz
Date:
Subject: Re: [INTERFACES] compile error