undefined symbol: PQescapeLiteral

Started by amul sulover 12 years ago3 messages
#1amul sul
sul_amul@yahoo.co.in

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/&quot;;
    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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: amul sul (#1)
Re: undefined symbol: PQescapeLiteral

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3amulsul
sul_amul@yahoo.co.in
In reply to: Tom Lane (#2)
Re: undefined symbol: PQescapeLiteral

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.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers