From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Archner <oliver.archner@bitoek.uni-bayreuth.de>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Calling C++ function
Date: Sun, 15 Aug 2004 14:27:38 -0400
Message-ID: <28455.1092594458@sss.pgh.pa.us> (raw)
In-Reply-To: <411CB6B8.1050909@bitoek.uni-bayreuth.de>
References: <411CB6B8.1050909@bitoek.uni-bayreuth.de>
Oliver Archner <oliver.archner@bitoek.uni-bayreuth.de> writes:
> Can anyone point me to example which calls a C++ function from a dynamic
> library ?
It's gonna be fairly painful, since the backend is a C program not a C++
program, and therefore it does not provide any of the infrastructure
that C++ code is likely to expect --- no exception stack, no global
constructors/destructors, no C++ library, etc. I am not sure how much
of this is practical to load after-the-fact in a dynamic library.
My inclination if you really need to use ImageMagick would be to shell
out to the IM executable via system() (or better popen(), if you have a
modern popen that supports 'r+' access).
regards, tom lane
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: tgl@sss.pgh.pa.us, oliver.archner@bitoek.uni-bayreuth.de
Subject: Re: Calling C++ function
In-Reply-To: <28455.1092594458@sss.pgh.pa.us>
* 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