Re: really in neeed of help...queston about libpxx

From: joseph speigle <joe(dot)speigle(at)jklh(dot)us>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: really in neeed of help...queston about libpxx
Date: 2003-12-18 05:46:58
Message-ID: 20031218054658.GA15540@www.sirfsup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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 need to link something?
>
> joseph speigle <joe(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mace, Richard 2003-12-18 08:40:15
Previous Message Michael Fuhr 2003-12-17 21:32:26 Re: postgres library simailar to mysql.h