Re: function compiled with g++ - Mailing list pgsql-general

From Jeff Davis
Subject Re: function compiled with g++
Date
Msg-id 200109240610.XAA16592@smtp.ucsd.edu
Whole thread Raw
In response to function compiled with g++  (Boris Pran <boris.pran@finteh.hr>)
List pgsql-general
C++ mangles the symbols for linking, i.e. a function named "foo" might not be
the symbol "foo". Try using the 'extern "C" { ... }' to make the symbols keep
their names like in C.

Hope this helps,
Jeff Davis

On Sunday 23 September 2001 11:03 pm, you wrote:
> Why the same function writen in C, compiled with gcc works OK, but compiled
> with g++, doesn't even load? Not mentioning those written in C++.
>
> i.e. loader reports undefined symbol: pg_detoast_datum__FP7varlena or some
> other undefined symbol...
>
> I would actually need to know should I forget C++ for writing functions or
> am I just doing something wrong ?
>
> Thanks.
> Boris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

pgsql-general by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: function compiled with g++
Next
From: Denis Gasparin
Date:
Subject: Database readonly permissions