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

Re: How to include pgsql static libraries in your own app written in Xcode?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter K(dot) Stys" <pkstys(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to include pgsql static libraries in your own app written in Xcode?
Date: 2009-11-03 03:43:06
Message-ID: 23189.1257219786@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Peter K. Stys" <pkstys(at)gmail(dot)com> writes:
> I'd like to create a plugin with all pgsql libs statically linked into my
> plugin to create a standalone solution.

> I've added the libpq.a library and included libpq-fe.h and postgres_ext.h
> that it needs.  The linker reports a bunch of errors:

>   "_BIO_free", referenced from:

I believe that's openssl code.  Unless you also have static libraries
for openssl, and any other libraries you've compiled libpq to depend on,
there is no hope of making a self-contained executable.

FWIW, most people realized that monolithic statically-linked executables
are a terrible idea about ten years ago.  You have no idea the amount of
maintenance pain you are setting up for yourself and your users.
Do you really want to relink Postgres every time there's an openssl
security update?

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Don FoxDate: 2009-11-03 04:02:25
Subject: Re: Install problems for postgresql-8.4.1
Previous:From: Peter K. StysDate: 2009-11-03 02:07:47
Subject: How to include pgsql static libraries in your own app written in Xcode?

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