Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> External procedure using C++
Hi,
I am trying to create external procedure with C++ on ORACLE8.1.7 (Solaris/Intel). But I have some problem. Oracle reported error messages like this.
ORA-06520: PL/SQL:Error loading external library. ORA-06522: ld.so.1: ....... referenced sysmbol not found.
In c++ code, I just have a function like this.
extern "C" void Test(OCIExtProcContext *with_context, char *inStr, short inStrInd, short *return_indicator,
short *return_length)
{
char *outStr; outStr= new char[500]; //This line cause an error: *return_indicator=(short) OCI_IND_NULL; *return_length = strlen(outStr); delete outStr; //This line cause an error:}
if i change new, delete to malloc() and free(), external procedure will load successfully. Anyone can explain it or has a solution. I really need for using c++ because my code is programming in c++. Thank you in advance.
Best regards,
Yai
Received on Wed Oct 17 2001 - 23:47:13 CDT