Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group