Re: C++ and v7.3.2 - Mailing list pgsql-general

From Erwin Rol
Subject Re: C++ and v7.3.2
Date
Msg-id 1051212378.6682.66.camel@vaio.erwin.muffin.org
Whole thread Raw
In response to C++ and v7.3.2  (Dev <dev@umpa-us.com>)
Responses Re: C++ and v7.3.2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
It looks like a namespace problem. string is in the std namespace, and
just using "string" will  not work unless you have a "using namespace
std;" or by putting "std::string" instead of "string".

- Erwin


On Thu, 2003-04-24 at 19:14, Dev wrote:
> Hello all,
>
> I have just started working with C++ and am trying to get it to compile an
> app for PGSQL and well it has errors:
> I am using the test files that came with 7.2.1 (they did not work with
> 7.2.1 either)
>
> any thoughts?
>
> c++ testlibpq0.cc -o test.app
> In file included from pgsql/libpq++.h:27,
>                   from testlibpq0.cc:18:
> pgsql/libpq++/pgconnection.h:86: ISO C++ forbids declaration of
> `string' with no type
> pgsql/libpq++/pgconnection.h:86: parse error before `('
> In file included from pgsql/libpq++.h:29,
>                   from testlibpq0.cc:18:
> pgsql/libpq++/pglobject.h:42: syntax error before `;'
> pgsql/libpq++/pglobject.h:61: syntax error before `('
> In file included from pgsql/libpq++.h:31,
>                   from testlibpq0.cc:18:
> pgsql/libpq++/pgcursordb.h:53: `string' was not declared in this scope
> pgsql/libpq++/pgcursordb.h:53: parse error before `,'
> pgsql/libpq++/pgcursordb.h:62: `string' was not declared in this scope
> pgsql/libpq++/pgcursordb.h:62: parse error before `)'
> pgsql/libpq++/pgcursordb.h:65: `string' was not declared in this scope
> pgsql/libpq++/pgcursordb.h:65: parse error before `,'
> pgsql/libpq++/pgcursordb.h:68: syntax error before `;'
> pgsql/libpq++/pgcursordb.h: In method `const char *PgCursor::Cursor ()
> const':
> pgsql/libpq++/pgcursordb.h:59: `pgCursor' undeclared (first use this
> function)
> pgsql/libpq++/pgcursordb.h:59: (Each undeclared identifier is reported
> only once for each function it appears in.)
> pgsql/libpq++/pgcursordb.h: In method `void PgCursor::Cursor (...)':
> pgsql/libpq++/pgcursordb.h:62: `cursor' undeclared (first use this
> function)
> testlibpq0.cc: In function `int main ()':
> testlibpq0.cc:34: `string' undeclared (first use this function)
> testlibpq0.cc:34: parse error before `;'
> testlibpq0.cc:40: `buf' undeclared (first use this function)
> testlibpq0.cc:40: `getline' undeclared (first use this function)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
--
              Dipl.-Ing. Erwin Rol - Software Engineering
tel: +49-(0)8024-479377  gsm: +49-(0)171-6929198 fax: +49-(0)8024-479379
                        email: erwin@muffin.org

Attachment

pgsql-general by date:

Previous
From: "David Olbersen"
Date:
Subject: Re: ODBC & Access [Try 2]
Next
From: Dennis Gearon
Date:
Subject: Re: [SQL] rewriting values with before trigger