Re: PG Extensions: Must be statically linked?

From: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG Extensions: Must be statically linked?
Date: 2006-03-02 22:47:05
Message-ID: 440775E9.50009@modgraph-usa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>>I'm creating user-defined server extensions, written in C per the
>>manual "31.9. C-Language Functions". Everything works well, but only
>>if I fully link the .so such that there are *no* unresolved external
>>references at all. Not even the stuff in libstdc++.a can be left out.
>
> If you're using libstdc++.a, you are not writing C. There is no support
> for C++ in the backend, and I would strongly advise not trying to use
> it, as any of C++'s moderately interesting features like exceptions will
> not play nicely with the backend environment.

Unfortunately, we're also using a second library (OpenBabel) that is written in C++. A good portion of the code I've written is a wrapper layer that hides the C++ objects and presents a simple C wrapper that works for Postgres.

Craig

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John 2006-03-02 23:18:12 Installation problem
Previous Message Neil Conway 2006-03-02 22:33:34 Re: INS/UPD/DEL Returning P.tch