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

Maarten Boekhold <maartenb@dutepp0.et.tudelft.nl>

From: Maarten Boekhold <maartenb@dutepp0.et.tudelft.nl>
To: Sidney Traynham <traynham@wsp1.websp.com>
Cc: pgsql-hackers@postgreSQL.org
Date: 1998-06-12T07:47:21Z
Lists: pgsql-hackers
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                         |
-----------------------------------------------------------------------------