From: Volosatov Alexander <rope-walker@yandex.ru>
To: pgsql-cygwin@postgresql.org
Subject: compile example
Date: Wed, 25 Jan 2006 12:39:03 +0300 (MSK)
Message-ID: <43D74737.000003.12307@tide.yandex.ru> (raw)
Hi!
Try to compile libpqxx example:
#include <iostream>
#include <pqxx/pqxx>
using namespace std;
using namespace pqxx;
int main()
{
try
{
connection C;
cout << "Connected to " << C.dbname() << endl;
work W(C);
result R = W.exec("SELECT name FROM employee");
cout << "Found " << R.size() << "employees:" << endl;
for (result::const_iterator r = R.begin();
r != R.end();
++r)
{
cout << r[0].c_str() << endl;
}
cout << "Doubling all employees' salaries..." << endl;
W.exec("UPDATE employee SET salary=salary*2");
cout << "Making changes definite: ";
W.commit();
cout << "ok." << endl;
}
catch (const exception &e)
{
cerr << e.what() << endl;
return 1;
}
return 0;
}
Use Dev-Cpp + mingw32.
Have errors:
...
345 C:\Dev-Cpp\include\pqxx\largeobject.hxx `in' was not declared in this scope
345 C:\Dev-Cpp\include\pqxx\largeobject.hxx `out' was not declared in this scope
...
380 C:\Dev-Cpp\include\pqxx\largeobject.hxx there are no arguments to `eback' that depend on a template parameter, so a declaration of `eback' must be available
...
they repeates.
Please help.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-cygwin@postgresql.org
Cc: rope-walker@yandex.ru
Subject: Re: compile example
In-Reply-To: <43D74737.000003.12307@tide.yandex.ru>
References: <43D74737.000003.12307@tide.yandex.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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