compile example - Mailing list pgsql-cygwin

From Volosatov Alexander
Subject compile example
Date
Msg-id 43D74737.000003.12307@tide.yandex.ru
Whole thread Raw
List pgsql-cygwin
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
declarationof `eback' must be available  
...
they repeates.

Please help.

pgsql-cygwin by date:

Previous
From: "pobox@verysmall.org"
Date:
Subject: PostgreSQL 8.1.2 crashes diring import - 8.0.4 does not
Next
From: "pobox@verysmall.org"
Date:
Subject: Re: Trouble in using initdb