Обсуждение: Libpq++ and RH5.1

Поиск
Список
Период
Сортировка

Libpq++ and RH5.1

От
Sidney Traynham
Дата:
I am trying to use Libpq++ for PG6.3.2 and Red Hat 5.1, and am having
trouble
compiling programs that use it.  I tried #include <libpq++.h> and didn't
link
and libpq dirs and I got some linker errors (not able to find such and
such
functions), then I tried linking the way I used to with just plain old
libpq,
but to avail.  Everyone says that libpq is better, but I like the C++
interface better, and want to try to get that to work.

If anyone has had any luck with libpq++ in general and could send me the
basics on what command line options I need to use to compile and what
header
files to include I would greatly appreciate it.

Please cc me any responses.

Thanks,

Sidney Traynham

sidney@websp.com

******************************************************
Sidney Traynham            Phone:    (888) 932-7780
206 N. Oakland St.            (703) 527-4672
Arlington, VA, 22203        Fax:      (703) 527-5004
Email: traynham@websp.com    Pager:    (703) 469-7441
******************************************************


Re: [HACKERS] Libpq++ and RH5.1

От
Maarten Boekhold
Дата:
On Thu, 11 Jun 1998, Sidney Traynham wrote:

> I am trying to use Libpq++ for PG6.3.2 and Red Hat 5.1, and am having
> trouble
> compiling programs that use it.  I tried #include <libpq++.h> and didn't
> link
> and libpq dirs and I got some linker errors (not able to find such and
> such
> functions), then I tried linking the way I used to with just plain old
> libpq,
> but to avail.  Everyone says that libpq is better, but I like the C++
> interface better, and want to try to get that to work.
>
> If anyone has had any luck with libpq++ in general and could send me the
> basics on what command line options I need to use to compile and what
> header
> files to include I would greatly appreciate it.

IIRC you have to include both libpq++.h as well as libpq-fe.h, and you'll
have to link with -lpq -lpq++ and possibly with -lcrypt

Maarten

_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems  |
|                   Department of Electrical Engineering                    |
|           Computer Architecture and Digital Technique section             |
|                          M.Boekhold@et.tudelft.nl                         |
-----------------------------------------------------------------------------