Re: Difficulty getting started with Postgres C++ interface

Поиск
Список
Период
Сортировка
От Jeroen T. Vermeulen
Тема Re: Difficulty getting started with Postgres C++ interface
Дата
Msg-id 20030129131339.GF46476@xs4all.nl
обсуждение исходный текст
Ответ на Difficulty getting started with Postgres C++ interface  ("David Wright" <dwright@mergetel.com>)
Список pgsql-interfaces
On Mon, Jan 27, 2003 at 05:42:11PM -0500, David Wright wrote:
> 
> g++ -I/usr/include/pgsql myc.cpp -o myc
> 
> /home/dwright/tmp/ccx7SvXE.o(.PgDatabase::gnu.linkonce.t.(char const *)+0x13): undefined reference to
`PgConnection::PgConnection(charconst *)'
 

If you're going to use a library, you'll have to link to it to get
a working program:

g++ -I/usr/include/pgsql myc.cpp -lpq++ -o myc

You may also have to link to the underlying C library, libpq:

g++ -I/usr/include/pgsql myc.cpp -lpq++ -lpq -o myc



And finally--shameless plug coming up--you may want to use libpqxx
instead of libpq++:
 http://gborg.postgresql.org/project/libpqxx/


Jeroen



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "David Wright"
Дата:
Сообщение: Difficulty getting started with Postgres C++ interface
Следующее
От: ljb
Дата:
Сообщение: Any interest in a Tcl-only libpgtcl project?