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: Calling C++ shared library

Re: Calling C++ shared library

From: <mgogala_at_rocketmail.com>
Date: Fri, 08 Jan 1999 02:45:39 GMT
Message-ID: <773rgj$um$1@nnrp1.dejanews.com>


In article <369517E4.6140FD1B_at_mci.com>,   Harry Harcrow <Harry.Harcrow_at_mci.com> wrote:
> I am working on a DEC UNIX 4.0d platform with Oracle release 8.0.4.1. I
> am having trouble calling a C++ shared library from within an oracle
> database trigger. When I invoke the trigger I get error message 28576.
> It appears that there is a problem calling shared libraries containing
> C++ source code. In one instance, I moved my return statement in front
> of a class instantiation and I do not have any problems. When I put the
> class instantiation before the return statement I receive error number
> 28576.
>
> Has anyone seen this before? Does this also happen in 8.0.5.0?
>
> Thanks,
>
> Harry Harcrow
>
>

I don't know about DEC Unix, but under Solaris, external procedure calls use dlopen,dlsym interface to get symbols from the shared library. If you try to use C++, C++ compiler will mangle routine names (overloading and signatures), so Oracle will not be able to reach them with shared library manipulation routines, and thus you will not be able to perform the call. The only thing you can do is to call C++ from C (external C {.....}) and then call C++ from within C routine. The other thing to do would be to mangle object names yourself and use symbols like myroutineF$Ic when defining external procedures. Regards,

--
Mladen Gogala

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Jan 07 1999 - 20:45:39 CST

Original text of this message

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