Skip site navigation (1) Skip section navigation (2)

Re: libpq++ compiling errors...

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: isaac flemmin <isaac(at)knox(dot)net>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq++ compiling errors...
Date: 2002-01-30 06:52:57
Message-ID: 1012373578.17615.40.camel@linda (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Wed, 2002-01-30 at 00:53, isaac flemmin wrote:

> g++  -I/usr/local/pgsql/include -o testlibpq0
> -L/usr/local/pgsql/lib -lpq++
> In file included from ../libpq++.h:27,
>                  from
> /usr/local/pgsql/include/libpq++/pgconnection.h:85: syntax error before
> `('
> In file included from ../libpq++.h:29,
>                  from
> /usr/local/pgsql/include/libpq++/pglobject.h:36: syntax error before `;'

I have very little experience of C++, but all these errors relate to the
string class; it appears not to be provided by your class library. 
pgconnection.h appears to contemplate the possibility, since the
inclusion of string.h is enclosed in an #ifdef, but there is no
alternative provided.

I think that libpq++ is very poorly tested.  If you look back in the
archives a week or two, you will find mention of a new C++ interface
that would replace libpq++.

> gcc  -Wl,-rpath,/usr/local/pgsql/lib  testlibpq.o   -o testlibpq
> testlibpq.o: In function `main':
> testlibpq.o(.text+0x1c): undefined reference to `PQsetdbLogin'

This is a link error; the command does not link the libpq library into
the executable.  You need to add "-lpq" to the link options.

Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                    
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "The Lord knoweth how to deliver the godly out of 
      temptations, and to reserve the unjust unto the day of
      judgment to be punished;"            II Peter 2:9 

In response to


pgsql-interfaces by date

Next:From: isaac flemminDate: 2002-01-30 08:52:48
Subject: Re: libpq++ compiling errors...
Previous:From: isaac flemminDate: 2002-01-30 00:53:07
Subject: libpq++ compiling errors...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group