Thread: really in neeed of help...queston about libpxx
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
libpqxx is a c++ wrapper on top of the c client library which gets installed along with the database itself. So, the libpqxxfunctions call the c functions, but provides an object oriented interface to those functions. For example, thereis a connection object, transaction object... The configure script you run when preparing to compile libpqxx checksfor (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 thedemos. The documentation for libpqxx is sometimes a duplication of the postgresql C documentation. Like, the connection constructortakes 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 Linux9.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++ programsthat use libxx? Is the tutorial (html files) found in the pqxx package enough or should I also study the documentationsfound pgsql? > > Hope somebody can help me. I really need to get this working soon. Thanks!! -- joe speigle
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: > 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 needto link something? > > joseph speigle <joe.speigle@jklh.us> wrote: > libpqxx is a c++ wrapper on top of the c client library which gets installed along with the database itself. So, the libpqxxfunctions call the c functions, but provides an object oriented interface to those functions. For example, there isa connection object, transaction object... The configure script you run when preparing to compile libpqxx checks for (onthis 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 thedemos. > > The documentation for libpqxx is sometimes a duplication of the postgresql C documentation. Like, the connection constructortakes 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 Linux9.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++ programsthat use libxx? Is the tutorial (html files) found in the pqxx package enough or should I also study the documentationsfound pgsql? > > > > Hope somebody can help me. I really need to get this working soon. Thanks!! > -- joe speigle