Thread: static linkage with libpq?

static linkage with libpq?

From
Christoph Dalitz
Date:
Hello,

while I can link against libpq.so on my system (Debian 3.0, PG 7.2),
I cannot link against libpq.a. In the latter case I obtain errors like

/tmp/ccLM7BSR.o(.text+0x69): undefined reference to `PQsetdbLogin'

/usr/lib/libpq.a is installed and contains the following objects:

dalitz:[test]> ar t /usr/lib/libpq.a
fe-print.o
fe-lobj.o
fe-exec.o
fe-connect.o
fe-auth.o
md5.o
fe-misc.o
wchar.o
pqsignal.o
pqexpbuffer.o
encnames.o
dllist.o

Any ideas?

Christoph Dalitz

Re: static linkage with libpq?

From
Oliver Elphick
Date:
On Wed, 2002-07-10 at 12:52, Christoph Dalitz wrote:

> while I can link against libpq.so on my system (Debian 3.0, PG 7.2),
> I cannot link against libpq.a. In the latter case I obtain errors like

Are you using the Debian packaged libraries or your own build?

If you are using the packages, is postgresql-dev the same version as
libpgsql2?