pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
libpq++ and kdevelop
4+ messages / 3 participants
[nested] [flat]

* libpq++ and kdevelop
@ 2003-11-07 06:04  Julie Russell <julie.russell@throughput.com.au>
  0 siblings, 1 reply; 4+ messages in thread

From: Julie Russell @ 2003-11-07 06:04 UTC (permalink / raw)
  To: pgsql-interfaces

Hi Everyone,

I am new to libpq++ and am trying to install the library in KDevelop. I put
the cxxflags as -I/usr/include/pgsql and the additional libraries
as -l/usr/lib -lpq++, however I am getting compiler errors. Am I missing
something? Are my flags correct? Any help would be great!

Cheers,
Julie.






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpq++ and kdevelop
@ 2003-11-07 07:36  Alberto Cabello Sanchez <alberto@unex.es>
  parent: Julie Russell <julie.russell@throughput.com.au>
  0 siblings, 0 replies; 4+ messages in thread

From: Alberto Cabello Sanchez @ 2003-11-07 07:36 UTC (permalink / raw)
  To: pgsql-interfaces

On Fri, Nov 07, 2003 at 05:04:44PM +1100, Julie Russell wrote:
> 
> I am new to libpq++ and am trying to install the library in KDevelop. I put
> the cxxflags as -I/usr/include/pgsql and the additional libraries
> as -l/usr/lib -lpq++, however I am getting compiler errors. Am I missing
> something? Are my flags correct? Any help would be great!
>

I think you should be putting additional libraries as -L/usr/lib/pgsql (or
where you .so is) -lpq++. 

Hope this helps. If not, you can let us know what exactly the errors look
like.

--
Alberto Cabello Sánchez



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpq++ and kdevelop
@ 2003-11-09 22:57  Julie Russell <julie.russell@throughput.com.au>
  0 siblings, 1 reply; 4+ messages in thread

From: Julie Russell @ 2003-11-09 22:57 UTC (permalink / raw)
  To: 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.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpq++ and kdevelop
@ 2003-11-10 16:41  Jeroen T. Vermeulen <jtv@xs4all.nl>
  parent: Julie Russell <julie.russell@throughput.com.au>
  0 siblings, 0 replies; 4+ messages in thread

From: Jeroen T. Vermeulen @ 2003-11-10 16:41 UTC (permalink / raw)
  To: Julie Russell <julie.russell@throughput.com.au>; +Cc: pgsql-interfaces

On Mon, Nov 10, 2003 at 09:57:24AM +1100, Julie Russell wrote:
> 
> 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.
 
Actually, libpq++ is fairly outdated.  You may want to take a look at the
newer libpqxx instead: http://pqxx.tk/


> 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

Could it be that there's an unclosed brace or parenthesis, or a missing
semicolon somewhere above the point where this header is included?


Jeroen




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-11-10 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 06:04 libpq++ and kdevelop Julie Russell <julie.russell@throughput.com.au>
2003-11-07 07:36 ` Alberto Cabello Sanchez <alberto@unex.es>
2003-11-09 22:57 Re: libpq++ and kdevelop Julie Russell <julie.russell@throughput.com.au>
2003-11-10 16:41 ` Jeroen T. Vermeulen <jtv@xs4all.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox