On Wed, 2002-01-30 at 00:53, isaac flemmin wrote:
> g++ -I/usr/local/pgsql/include -o testlibpq0 testlibpq0.cc
> -L/usr/local/pgsql/lib -lpq++
>
> In file included from ../libpq++.h:27,
>
> from testlibpq0.cc:18:
>
> /usr/local/pgsql/include/libpq++/pgconnection.h:85: syntax error before
> `('
>
> In file included from ../libpq++.h:29,
>
> from testlibpq0.cc:18:
>
> /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.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
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
judgmentto be punished;" II Peter 2:9