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?