2011-04-17 88 views
2

我想在我的C++項目中使用libpqxx(3.1)以連接到我的postgresql數據庫。我正在使用最新版本的xcode(xcode 4)。無法與libpqxx和xcode4編譯(C++)

我正確地進行了安裝(./configure,make和make install),並在我的頁眉搜索路徑和庫搜索路徑中添加了該庫。

頭搜索路徑:在/ usr /本地/包括 庫搜索路徑:在/ usr/local/lib目錄

然後,

#include <pqxx/pqxx> 

,我得到以下錯誤在pqxx /光標。 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()); 
    } 

沒有匹配的構造函數初始化的內部:: sql_cursor'

我應該編輯這個文件嗎?

感謝您的幫助。

回答

1

最後,我編輯了圖書館和改變:

m_cur(trans, adopted_cursor, up, op) 

到:

m_cur(trans, adopted_cursor, op) 

相匹配的構造函數簽名。