Thread: undefined symbol: PQescapeLiteral

undefined symbol: PQescapeLiteral

From
amul sul
Date:
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

Re: undefined symbol: PQescapeLiteral

From
Tom Lane
Date:
amul sul <sul_amul@yahoo.co.in> writes:
> While testing performance of PG9.2.4 using DBT5, I am getting error in 
> *BrokerageHouseMain: symbol lookup error: BrokerageHouseMain: undefined symbol: PQescapeLiteral*

You're linking against a pre-9.0 copy of libpq.so.
        regards, tom lane



Re: undefined symbol: PQescapeLiteral

From
amulsul
Date:
>You're linking against a pre-9.0 copy of libpq.so.

Thanks for help :)

I got my mistake .


Regards,
Amul Sul



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/undefined-symbol-PQescapeLiteral-tp5767578p5767994.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.