pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emilio Recio <erecio@storm.jmc.tju.edu>
To: pgsql-interfaces@postgresql.org
Subject: Re: Cannot Statically Link libpq.a
Date: Wed, 25 Sep 2002 09:46:49 -0400
Message-ID: <3D91BE49.5050904@storm.jmc.tju.edu> (raw)
References: <3D91B97F.6090002@storm.jmc.tju.edu>

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




view thread (3+ messages)  latest in thread

Message-ID: <3D91BE49.5050904@storm.jmc.tju.edu>
Permalink:  ../3D91BE49.5050904@storm.jmc.tju.edu/
Also on:    postgresql.org/message-id/3D91BE49.5050904@storm.jmc.tju.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: erecio@storm.jmc.tju.edu
  Subject: Re: Cannot Statically Link libpq.a
  In-Reply-To: <3D91BE49.5050904@storm.jmc.tju.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox