I'm trying to make my first db program and I've tried this:
#include <pqxx/pqxx>
#include <iostream>
using namespace std;
int main()
{
pqxx::connection MyConn ("dbname=dbESM user=postgres");
//pqxx::work txn(MyConn);
cout << "Hello world!" << endl;
return 0;
}
But I get the following error on hitting F9:
/usr/include/pqxx/connection.hxx|87|undefined reference to pqxx::connectionpolicy::connectionpolicy(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
I'm not sure how to get about this. Any help would be really appreciated.
I'm using Ubuntu 12.04.
Thanks!