undefined symbol: PQescapeLiteral - Mailing list pgsql-hackers

From amul sul
Subject undefined symbol: PQescapeLiteral
Date
Msg-id 1376620982.81314.YahooMailNeo@web193506.mail.sg3.yahoo.com
Whole thread Raw
Responses Re: undefined symbol: PQescapeLiteral  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

While testing performance of PG9.2.4 using DBT5, I am getting error in 

<dbt5_output_result>/bh/bh.out     file as :

*BrokerageHouseMain: symbol lookup error: BrokerageHouseMain: undefined symbol: PQescapeLiteral*


So i tried with CPP code as follow
-------------------------- test.cpp ------------------------------------------
#include <iostream>
#include <libpq-fe.h>
#include <string.h>

using namespace std;

int main(){
    PGconn *db;
    char connstring[] = "dbname=postgres";
    db = PQconnectdb(connstring);
    char url[] = "https://www.google.co.jp/";
    cout<< PQescapeLiteral(db, (const char *)url, (size_t) strlen(url))<<"\n";
}
-------------------------------------------------------------------------------------


While compilation using GCC,
gcc test.cpp

throws error :
 test.cpp: In function ‘int main()’:
 test.cpp:22: error: ‘PQescapeLiteral’ was not declared in this scope

Do i missing something? 

Thanks & regards,
Amul Sul

pgsql-hackers by date:

Previous
From: Vlad Arkhipov
Date:
Subject: Re: System catalog vacuum issues
Next
From: Tom Lane
Date:
Subject: Re: undefined symbol: PQescapeLiteral