dbTalk Databases Forums  

really in neeed of help...queston about libpxx

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss really in neeed of help...queston about libpxx in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peggy Go
 
Posts: n/a

Default really in neeed of help...queston about libpxx - 12-17-2003 , 12:29 PM






Hi! Im just new to pgsql. I'm trying to use pqxx since the program that I'll be doing is in C++. I'm using Redhat Linux 9.0 and using KDevelop for programming. What do I need to do in order to get libxx working? (linking libraries, etc) I've already installed them but haven't tried integrating the database in my program yet. Do you have sample C++ programs that use libxx? Is the tutorial (html files) found in the pqxx package enough or should I also study the documentations found pgsql?

Hope somebody can help me. I really need to get this working soon. Thanks!!


---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Reply With Quote
  #2  
Old   
joseph speigle
 
Posts: n/a

Default Re: really in neeed of help...queston about libpxx - 12-17-2003 , 03:01 PM







libpqxx is a c++ wrapper on top of the c client library which gets installed along with the database itself. So, the libpqxx functions call the c functions, but provides an object oriented interface to those functions. For example, there is a connection object, transaction object... The configure script you run when preparing to compile libpqxx checks for (on this install) /usr/local/lib/pgsql/libpq.so, and then links against -lpq

the download has good tests which are demo programs. They are compiled with 'make test'. I got pretty far with using the demos.

The documentation for libpqxx is sometimes a duplication of the postgresql C documentation. Like, the connection constructor takes the same arguments, the environment variables are the same, etc.

Quote:
Hi! Im just new to pgsql. I'm trying to use pqxx since the program that I'll be doing is in C++. I'm using Redhat Linux 9.0 and using KDevelop for programming. What do I need to do in order to get libxx working? (linking libraries, etc) I've already installed them but haven't tried integrating the database in my program yet. Do you have sample C++ programs that use libxx? Is the tutorial (html files) found in the pqxx package enough or should I also study the documentations found pgsql?

Hope somebody can help me. I really need to get this working soon. Thanks!!
--
joe speigle

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #3  
Old   
joseph speigle
 
Posts: n/a

Default Re: really in neeed of help...queston about libpxx - 12-17-2003 , 11:46 PM



Peggy,


my common includes are:

// libpq++
#include <pqxx/connection.h>
#include <pqxx/transaction.h>
#include <pqxx/result.h>
#include <pqxx/tablereader.h>
#include <pqxx/transaction.h>
#include <pqxx/all.h>

Yes, the link step should have a -lpq in it so that it can use the functions which were defined in the header.

you should look for the files above such as connection.h then prefix them with the directory if necessary.

I don't know how to add these to kdevelop environemnt
On Wed, Dec 17, 2003 at 09:29:54PM -0800, Peggy Go wrote:
Quote:
THanks. I tried including libpqxx in my program ( #include <libpqxx/libpqxx> ) but when I compiled it says "#include <libpqxx/libpqxx> file or directory not found". What should i do in order for KDEVELOP to see the library libpqxx? Do i need to link something?

joseph speigle <joe.speigle (AT) jklh (DOT) us> wrote:
libpqxx is a c++ wrapper on top of the c client library which gets installed along with the database itself. So, the libpqxx functions call the c functions, but provides an object oriented interface to those functions. For example, there is a connection object, transaction object... The configure script you run when preparing to compile libpqxx checks for (on this install) /usr/local/lib/pgsql/libpq.so, and then links against -lpq

the download has good tests which are demo programs. They are compiled with 'make test'. I got pretty far with using the demos.

The documentation for libpqxx is sometimes a duplication of the postgresql C documentation. Like, the connection constructor takes the same arguments, the environment variables are the same, etc.

Hi! Im just new to pgsql. I'm trying to use pqxx since the program that I'll be doing is in C++. I'm using Redhat Linux 9.0 and using KDevelop for programming. What do I need to do in order to get libxx working? (linking libraries, etc) I've already installed them but haven't tried integrating the database in my program yet. Do you have sample C++ programs that use libxx? Is the tutorial (html files) found in the pqxx package enough or should I also study the documentations found pgsql?

Hope somebody can help me. I really need to get this working soon. Thanks!!

--
joe speigle

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.