Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems calling C++ routines from PL/SQL
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
![]() |
![]() |