From: Tom Lane <tgl@sss.pgh.pa.us>
To: Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Help with adding C-Language Functions
Date: Thu, 10 Feb 2005 15:43:39 -0500
Message-ID: <2358.1108068219@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.60.0502101251550.5503@frost>
References: <Pine.LNX.4.60.0502091954340.5503@frost>
<Pine.LNX.4.60.0502100114310.5503@frost>
<27779.1108056673@sss.pgh.pa.us>
<Pine.LNX.4.60.0502101251550.5503@frost>
Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca> writes:
> I have c++ classes i want to use but when i complile using g++ i get the
> error (cant find function x in file.so). Does anyone have experience
> compiling c++ and loading the function?
The immediate problem is that you didn't declare the function as extern
"C" so it doesn't follow C naming conventions. In general, though, it's
fairly difficult to use any interesting C++ capabilities in a Postgres
backend module, because the main backend does not contain the C++
library. So, for instance, I'd not expect C++ exceptions or RTTI to
work at all well.
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, carrolls@cpsc.ucalgary.ca
Subject: Re: Help with adding C-Language Functions
In-Reply-To: <2358.1108068219@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