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

Compiling a static libpq

From: Julia Jacobson <julia(dot)jacobson(at)arcor(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Compiling a static libpq
Date: 2011-04-03 17:07:01
Message-ID: 4D98A935.30101@arcor.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Dear PostgreSQL developers,

After having done extensive web search and not found anybody to solve 
the problem of interest on the general PostgreSQL mailing list, in the 
PostgreSQL newsgroup on usenet or on the PostgreSQL IRC channel, I would 
like to ask you how to compile a static libpq working without a dynamic 
libpq.
So far, I've compiled libpq (from PostgreSQL version 8.4.6, 8.4.7 and 
9.0.3) on my own under Linux (Ubuntu 10.4), Mac OS X 10.4 and Windows 7 
using GCC.
Indeed, I always succeeded in producing libpq.a, but linking this 
library to a minimal application resulted in a program which only ran 
with libpq.dylib (libpq.dll or libpq.so - depending on the platform) 
being present and not without it.
It seems like the libpq.a produced by compiling PostgreSQL with 
"./configure" and "make" still imports the dynamic libpq.
Is there a way to get rid of the dependence on the dynamic libpq library 
in PostgreSQL client applications?

Thanks in advance,
Julia

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-04-03 17:26:11
Subject: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)
Previous:From: Tom LaneDate: 2011-04-03 16:41:56
Subject: Re: Should psql support URI syntax?

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