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

Home -> Community -> Usenet -> c.d.o.server -> External procedure using C++

External procedure using C++

From: Yai <paisarn_at_nectec.or.th>
Date: 17 Oct 2001 21:47:13 -0700
Message-ID: <c431db55.0110172047.55b84176@posting.google.com>


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

Original text of this message

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