Re: libpq question - Mailing list pgsql-novice

From Wright, George
Subject Re: libpq question
Date
Msg-id 51548D6D5BEB57468163194A8C1A0E980161A260@MAGPTCPEXC02.na.mag-ias.net
Whole thread Raw
In response to libpq question  ("Wright, George" <George.Wright@infimatic.com>)
List pgsql-novice
I cannot seem to build C++ code that uses the libpq++.h header file.

Including the file in my C++ code generates errors

Command line:
dev:/test # g++ -Wall -g -I. -I/usr/include/pgsql -c client.cpp

Errors.
/usr/include/pgsql/libpq++/pgconnection.h:48: error: invalid function
declaration
/usr/include/pgsql/libpq++/pgdatabase.h:37: error: invalid function
declaration
/usr/include/pgsql/libpq++/pglobject.h:38: error: invalid function
declaration
/usr/include/pgsql/libpq++/pgtransdb.h:38: error: invalid function
declaration
/usr/include/pgsql/libpq++/pgcursordb.h:44: error: invalid function
declaration


Line 48 of pgconnection.h
class DLLIMPORT PgConnection


Since DLLIMPORT is defined as nothing on my system in the file c.h, is
the problem that somehow it doesn't understand the use of the word
'class' as if it's trying to interpret it as C and not C++? Or is it
something else?

Any ideas?


pgsql-novice by date:

Previous
From: "Daniel T. Staal"
Date:
Subject: Re: Character set conversion
Next
From: "JORGE MALDONADO"
Date:
Subject: CANNOT CREATE A TABLESPACE