Re: Cannot Statically Link libpq.a

From: Emilio Recio <erecio(at)storm(dot)jmc(dot)tju(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Cannot Statically Link libpq.a
Date: 2002-09-25 13:46:49
Message-ID: 3D91BE49.5050904@storm.jmc.tju.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Emilio Recio wrote:

> libpq.a is in /usr/lib, but it's only about 93k. For the object files
> that seems alot. I need to statically link the library because I am
> going to be using a custom program in an embedded device where none of
> the above libraries mentioned in the ldd works. All the the programs
> statically link fine, except for libpq. I am using the redhat 7.3 rpms.

-- New

Several points to follow up on: ./configure && make && make install on
slackware 8.1 also did not produce a libpq.a file which I can use for
static linking. Tried (from postgresql src dir):

-- Cmd Line
ar r libpq.a `find /usr/local/src/postgresql-7.2.2/src |grep -v main.o`
ranlib libpq.a

--
And no go... can anyone tell me how to create a static library? Or which
object files to copy from postgresql source code to be able to link them
with testpg.c (note testpg.c can be found in the documentation for
postgresql - my program is significantly smaller and uses less postgress
calls.)

-- Clarification

ALso above, i meant, libpq.a seemed like too little, but it was 3am :)

-Elmo

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Emilio Recio 2002-09-25 13:57:28 Re: Cannot Statically Link libpq.a
Previous Message Emilio Recio 2002-09-25 13:26:23 Cannot Statically Link libpq.a