> Try using extern C around the C++ function that is called. Even if your
> code is C++ the interface should still be C for Oracle to be able to
> call it. It probably gives you the error because of name mangling,
> extern C should get around that.
Thanks for the advice! That worked, but when I tried to put something
C++'ish in my code I got another error. All I did was add this to the top
of my file:
#include <iostream>
If that line is there, then I get the following error:
SQL> select complex.plus(c1, c2) from complex_test;
select complex.plus(c1, c2) from complex_test
*
ERROR at line 1:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: /home/oracle/complex_lib.so: undefined symbol:
_ZNSt8ios_base4InitC1Ev
ORA-06512: at "SYS.COMPLEX_PKG", line 2
ORA-06512: at "SYS.COMPLEX", line 11
ORA-06512: at line 1
If I take the line out then the error goes away and everything works fine.
Unfortunately I need to be able to use C++ constructs. Any further advice?
Thanks,
Ross
Oracle LazyDBA home page