No title

Started by Zudi Iswantoover 24 years ago2 messages
#1Zudi Iswanto
zudi@dnet.net.id

Dear all ...
I have a postgres problem
I am developing application with c++
to connect to postgres SQL.

When I compiled my source.cc I found some error like this :

/tmp/ccy63XDd.o: In function `main':
/tmp/ccy63XDd.o(.text+0x70): undefined reference to `PQsetdbLogin'
/tmp/ccy63XDd.o(.text+0x91): undefined reference to `PQstatus'
/tmp/ccy63XDd.o(.text+0xc4): undefined reference to `PQerrorMessage'
collect2: ld returned 1 exit status

Please help me to fix the problem .....
Thank you for your attention ....

--
Zudi Iswanto

#2Patrick Welche
prlw1@newn.cam.ac.uk
In reply to: Zudi Iswanto (#1)
Re:

On Thu, Jul 26, 2001 at 04:55:14PM +0700, Zudi Iswanto wrote:

I am developing application with c++

...

/tmp/ccy63XDd.o(.text+0x70): undefined reference to `PQsetdbLogin'
/tmp/ccy63XDd.o(.text+0x91): undefined reference to `PQstatus'
/tmp/ccy63XDd.o(.text+0xc4): undefined reference to `PQerrorMessage'

Did you link libpq as well as libpq++ ? ie something like
-L/usr/local/lib/pgsql -Wl,-R/usr/local/lib/pgsql -lpq++ -lpq

Cheers,

Patrick