Simple compile question - Mailing list pgsql-interfaces

From Stephen Whinston
Subject Simple compile question
Date
Msg-id 0565CAF35FADD64DA09B86C3637BE7291492C2@coex01.trans.corp
Whole thread Raw
Responses Re: Simple compile question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
I just installed pgsql this morning and already encountered some difficulties. How do I compile a C/C++ client
applicationwith pgsql? Here's what I do: 

gcc -c -I/usr/local/pgsql/include sample.cpp

and I get:

aggregate 'PGconn conn' has incomplete type and cannot be initialized
aggregate 'PGresult res' has incomplete type and cannot be initialized

The libpq-fe.h file *is* in /usr/local/pgsql/include

What other include files am I missing?

Also, a lot of messages seem to indicate that there is sample code under the src/ dir. Where is this? It is not under
/usr/local/pgsql.Did I miss a step in the install? 

thanks,
Stephen


pgsql-interfaces by date:

Previous
From: Michael Klatt
Date:
Subject: PQcmdTuples() declaration
Next
From: Payman
Date:
Subject: Re: PQcmdTuples() declaration