Re: libpq++ and kdevelop

From: Julie Russell <julie(dot)russell(at)throughput(dot)com(dot)au>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq++ and kdevelop
Date: 2003-11-09 22:57:24
Message-ID: CAEDLLCOCGBPMAAFIFOCAEKPCAAA.julie.russell@throughput.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

I am programming on SuSE 8.2 in C++ using XLib, Xine and Common C++
packages. I have set up my flags for KDevelop for libpq++ as follows:

Compiler Options->Flags and Warnings->CXX Flags->
-I/usr/include/pgsql

Linker Options->Additional Libraries->

-L/usr/lib/pgsql -lpq++

All I have done in my code is add the header file to a class that has no
functionality at the moment:
#include <libpq++.h>

I am thinking that it is seeing the libraries perfectly but something else
is wrong, because the compiler errors are inside the libpq++ itself... I am
very new to both C and C++, so this is all very confusing to me.

Here is a copy of the errors I'm getting...

In file included from /usr/include/pgsql/libpq++.h:30,
from DatabaseHandler.h:26,
from DatabaseHandler.cpp:18:
/usr/include/pgsql/libpq++/pgconnection.h:49: error: syntax error before `{'
token
/usr/include/pgsql/libpq++/pgconnection.h:55: error: parse error before
`public
'
/usr/include/pgsql/libpq++/pgconnection.h:57: error: destructors must be
member
functions
/usr/include/pgsql/libpq++/pgconnection.h:57: error: virtual outside class
declaration
/usr/include/pgsql/libpq++/pgconnection.h:60: error: non-member function `
ConnStatusType Status()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgconnection.h:61: error: non-member function
`bool
ConnectionBad()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgconnection.h:62: error: non-member function
`const
char* ErrorMessage()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgconnection.h:65: error: non-member function
`const
char* DBName()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgconnection.h:76: error: parse error before `
protected'
/usr/include/pgsql/libpq++/pgconnection.h:79: error: syntax error before `('
token
/usr/include/pgsql/libpq++/pgconnection.h:81: error: ISO C++ forbids
declaration of `PgConnection' with no type
/usr/include/pgsql/libpq++/pgconnection.h:81: error: new declaration `int
PgConnection()'
/usr/include/pgsql/libpq++/pgconnection.h:57: error: ambiguates old
declaration
`void PgConnection()'
/usr/include/pgsql/libpq++/pgconnection.h:83: error: parse error before `
private'
/usr/include/pgsql/libpq++/pgconnection.h:87: error: syntax error before `&'
token
In file included from /usr/include/pgsql/libpq++.h:31,
from DatabaseHandler.h:26,
from DatabaseHandler.cpp:18:
/usr/include/pgsql/libpq++/pgdatabase.h:37: error: syntax error before `:'
token
/usr/include/pgsql/libpq++/pgdatabase.h:45: error: destructors must be
member
functions
/usr/include/pgsql/libpq++/pgdatabase.h:51: error: non-member function `
size_type Tuples()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:52: error: non-member function `
size_type CmdTuples()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:54: error: non-member function
`const
char* FieldName(int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:55: error: non-member function `int
FieldNum(const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:56: error: non-member function `Oid
FieldType(int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:57: error: non-member function `Oid
FieldType(const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:58: error: non-member function `int
FieldSize(int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:59: error: non-member function `int
FieldSize(const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:60: error: non-member function
`const
char* GetValue(int, int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:61: error: non-member function
`const
char* GetValue(int, const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:62: error: non-member function `bool
GetIsNull(int, int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:63: error: non-member function `bool
GetIsNull(int, const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:64: error: non-member function `int
GetLength(int, int)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:65: error: non-member function `int
GetLength(int, const char*)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:69: error: non-member function `void
DisplayTuples(FILE*, bool, const char*, bool, bool)' cannot have `const'
method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:71: error: non-member function `void
PrintTuples(FILE*, bool, bool, bool)' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:76: error: non-member function
`const
char* OidStatus()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgdatabase.h:79: error: parse error before `
protected'
/usr/include/pgsql/libpq++/pgdatabase.h:88: error: syntax error before `&'
token
In file included from /usr/include/pgsql/libpq++.h:32,
from DatabaseHandler.h:26,
from DatabaseHandler.cpp:18:
/usr/include/pgsql/libpq++/pglobject.h:38: error: syntax error before `:'
token
/usr/include/pgsql/libpq++/pglobject.h:43: error: 'string' is used as a
type,
but is not defined as a type.
/usr/include/pgsql/libpq++/pglobject.h:46: error: parse error before
`public'
/usr/include/pgsql/libpq++/pglobject.h:48: error: ISO C++ forbids
declaration
of `PgLargeObject' with no type
/usr/include/pgsql/libpq++/pglobject.h:48: error: only declarations of
constructors can be `explicit'
/usr/include/pgsql/libpq++/pglobject.h:49: error: destructors must be member
functions
/usr/include/pgsql/libpq++/pglobject.h:57: error: non-member function `int
Tell()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pglobject.h:62: error: parse error before `)'
token
/usr/include/pgsql/libpq++/pglobject.h:68: error: syntax error before `&'
token
In file included from /usr/include/pgsql/libpq++.h:33,
from DatabaseHandler.h:26,
from DatabaseHandler.cpp:18:
/usr/include/pgsql/libpq++/pgtransdb.h:38: error: syntax error before `:'
token
/usr/include/pgsql/libpq++/pgtransdb.h:44: error: destructors must be member
functions
/usr/include/pgsql/libpq++/pgtransdb.h:49: error: parse error before
`protected
'
/usr/include/pgsql/libpq++/pgtransdb.h:59: error: parse error before `&'
token
/usr/include/pgsql/libpq++/pgtransdb.h:59: error: ISO C++ forbids
declaration
of `PgTransaction' with no type
/usr/include/pgsql/libpq++/pgtransdb.h:60: error: syntax error before `&'
token
In file included from /usr/include/pgsql/libpq++.h:34,
from DatabaseHandler.h:26,
from DatabaseHandler.cpp:18:
/usr/include/pgsql/libpq++/pgcursordb.h:44: error: syntax error before `:'
token
/usr/include/pgsql/libpq++/pgcursordb.h:50: error: destructors must be
member
functions
/usr/include/pgsql/libpq++/pgcursordb.h:53: error: `string' was not declared
in
this scope
/usr/include/pgsql/libpq++/pgcursordb.h:53: error: parse error before `,'
token
/usr/include/pgsql/libpq++/pgcursordb.h:56: error: new declaration `int
Close()
'
/usr/include/pgsql/libpq++/pglobject.h:53: error: ambiguates old declaration
`
void Close()'
/usr/include/pgsql/libpq++/pgcursordb.h:60: error: non-member function
`const
char* Cursor()' cannot have `const' method qualifier
/usr/include/pgsql/libpq++/pgcursordb.h: In function `const char* Cursor()':
/usr/include/pgsql/libpq++/pgcursordb.h:61: error: `pgCursor' undeclared
(first
use this function)
/usr/include/pgsql/libpq++/pgcursordb.h:61: error: (Each undeclared
identifier
is reported only once for each function it appears in.)
/usr/include/pgsql/libpq++/pgcursordb.h: At global scope:
/usr/include/pgsql/libpq++/pgcursordb.h:65: error: `string' was not declared
in
this scope
/usr/include/pgsql/libpq++/pgcursordb.h:65: error: parse error before `)'
token
/usr/include/pgsql/libpq++/pgcursordb.h: In function `void Cursor(...)':
/usr/include/pgsql/libpq++/pgcursordb.h:67: error: `cursor' undeclared
(first
use this function)
/usr/include/pgsql/libpq++/pgcursordb.h: At global scope:
/usr/include/pgsql/libpq++/pgcursordb.h:70: error: parse error before `
protected'
/usr/include/pgsql/libpq++/pgcursordb.h:85: error: syntax error before `&'
token
gmake[3]: *** [DatabaseHandler.o] Error 1
gmake[3]: Leaving directory `/home/titadmin/xineplayer/xineplayer'
gmake[2]: Leaving directory `/home/titadmin/xineplayer/xineplayer'
gmake[2]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/titadmin/xineplayer'
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** failed ***

Thanks for the help,
Julie.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2003-11-10 16:41:08 Re: libpq++ and kdevelop
Previous Message Alberto Cabello Sanchez 2003-11-07 07:36:21 Re: libpq++ and kdevelop