On Sun, Dec 09, 2001 at 10:56:31PM -0500, Tim Boring wrote:
> I'm trying to compile the example program on p194 of PostgreSQL:
> Introduction and concepts, but the compiler (g++ v2.95.3) is complaining
> about an undefined reference to PgConnection::ConnectionBad() and other
> calls to class member functions. I've included the command I'm using to
> compile the source, the error message, and the source below. Any help in
> pointing out where the mistake is is greatly appreciated.
>
> Tim
>
>
> Here's the command line I'm using for compilation:
>
> g++ -I/usr/local/pgsql/include postgre.cpp -o postgre
> -L/usr/local/pgsql/lib -lpq++
It doesn't tie in with your error message, but I'm pretty sure you need
to link -lpq too.
Cheers,
Patrick