Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems calling C++ routines from PL/SQL

Re: Problems calling C++ routines from PL/SQL

From: Finn Ellebaek Nielsen <fen_at_changegroup.dk>
Date: Fri, 16 Aug 2002 17:58:31 +0200
Message-ID: <3d5d2127$0$88364$edfadb0f@dspool01.news.tele.dk>


Hi John.

You will need to declare your entry points as plain C functions using extern "C", eg:

extern "C" void MyFunction() {
  C++ code...
}

HTH. Finn

"John Trattles" <john.trattles_at_bt.com> wrote in message news:e1b5138b.0206200247.c7cb37e_at_posting.google.com...
> I have created a library (using Create or Replace Library) in an attempt
> to access an in-house library for generating error messages. I am using
> oracle 8.1.7.3 on a sun box (solaris 5.8).
>
> The PL/SQL code compiled ok but when I run the code I get the following
> error:
>
> *
> ERROR at line 1:
> ORA-06520: PL/SQL: Error loading external library
> ORA-06522: ld.so.1: extprocPLSExtProc: fatal: relocation error: file
> /projects/trinity/lib/libevent.so: symbol __1cG__CrunMex_rethrow_q6F_v_:
>
> referenced symbol not found
> ORA-06512: at "GAS_INTERFACE", line 0
> ORA-06512: at line 1
>
> I suspect the cause of this is that the library was created using C++
> rather than C (as the symbol __1cG__CrunMex_rethrow_q6F_v_ is a C++
> symbol). Am I correct in assuming that I won't be able to access the
> library in question from PL/SQL?
>
> Thanks
>
> John Trattles
Received on Fri Aug 16 2002 - 10:58:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US