2

我正在尝试在我的 C++ 项目中使用 libpqxx (3.1) 以连接到我的 postgresql 数据库。我正在使用最新版本的 xcode(xcode 4)。

我正确地进行了安装(./configure、make 和 make install)并将库添加到我的标题搜索路径和库搜索路径中。

头文件搜索路径:/usr/local/include 库搜索路径:/usr/local/lib

然后,

#include <pqxx/pqxx>

我在 pqxx/cursor.hxx 文件中收到以下错误:

  stateless_cursor(
    transaction_base &trans,
    const PGSTD::string adopted_cursor) :
    **m_cur(trans, adopted_cursor, up, op)**
  {
    // Put cursor in known position
    m_cur.move(cursor_base::backward_all());
  }

'internal::sql_cursor' 的初始化没有匹配的构造函数

我应该编辑这个文件吗?

谢谢你的帮助。

4

1 回答 1

1

最后,我编辑了库并更改了:

 m_cur(trans, adopted_cursor, up, op)

至 :

m_cur(trans, adopted_cursor, op)

匹配构造函数签名。

于 2011-04-18T15:39:48.640 回答