Simple compile question

Поиск
Список
Период
Сортировка
От Stephen Whinston
Тема Simple compile question
Дата
Msg-id 0565CAF35FADD64DA09B86C3637BE7291492C2@coex01.trans.corp
обсуждение исходный текст
Ответы Re: Simple compile question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Michael Klatt
Дата:
Сообщение: PQcmdTuples() declaration
Следующее
От: Payman
Дата:
Сообщение: Re: PQcmdTuples() declaration