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 -> Extern "C" in External Procedures

Extern "C" in External Procedures

From: Kenneth Herskedal <kenneth.herskedal_at_NOSPAMtrafsys.no>
Date: 2000/03/02
Message-ID: <89lt9h$oct$1@oslo-nntp.eunet.no>#1/1

Can anyone post a sample on how to use extern "C". Thanks in advance

Kenneth
www.trafsys.no

Previous postings (january 2000):

Thanks Fehrenbacher
It worked for me as well.
Its surprising though that I could not find a mention of this method in any Oracle documentation source.
For those of you who might be using external procedures in the future, do remeber to use extern "C" with your function/procedure declarations if you are using C++ compiler.

Cheers
Owais

In article <3891A4FD.D277E73_at_i-core.de>,   Judith Fehrenbacher <fehrenbacher_at_i-core.de> wrote:
> OK: I had exactly the same problem. My resolution was to put the
 extern "C"
> in front of my function declaration, because I'm using a C++ Compiler.
 Maybe
> this helps you too...
>
> Owais Anjum wrote:
>
> > I've done both the things. I've also started extproc listener in
> > listener.ora and tnsnames.ora files. That is why I am getting the
 error
> > message from extproc.exe which is titled "Bad Image".
> >
> > I'll try to get the document by tech support. I'll be waiting for
 more
> > feedback by you people though!
> >
> > Cheers
> >
> > In article <86otap$osf$1_at_nnrp1.deja.com>,
> > Nabil Courdy <moab_at_emirates.net.ae> wrote:
> > > Have you compiled the procedure that references
> > > the external procedure?
> > >
> > > ALTER procname COMPILE
> > >
> > > Also, you must start a extproc listener which
> > > must be defined in the listener.ora and the
> > > tnsnames.ora.
> > >
> > > There is a nice short document that tech support
> > > can send you on how to call external procedures.
> > >
> > > >
> > > > I am using external procedure to call a C dll from a stored
 procedure.
> > > > Breifly stating, I have performed the following steps:
> > > >
> > > > 1. Made a C dll. (e.g. notifier.dll)
> > > > 2. Declared the data dictionary library in Oracle. (notify)
> > > > 2. Defined the wrapper external procedure in Oracle with similar
 name
 a
> > > > parameter parameters as of the C procedure
> > > >
> > > > Now when I make the call to this external procedure, I get this
 Error
 at
> > > > the client side:
> > > >
> > > > ORA-06521: PL/SQL: Error mapping function
> > > > ORA-06522: Unable to load symbol from DLL
> > > > ORA-06512: at "IPORA.IPNOTIFY", line 0
> > > > ORA-06512: at line 1
> > > >
> > > > P.S. this error is generated by extproc.exe with the title "Bad
 Image"
> > > > I am using WinNT client with Oracle Server 8.0.4 on winNT as
 well.
> > > >
> > > > I am unable to figure out where things are going wrong. Can any
 give
 a
> > > > clue to what might be the problem area.
> > > >
> > > > Thanks and regards
> > > > Owais
> > > >
> > > > Sent via Deja.com http://www.deja.com/
> > > > Before you buy.
> > > >
> > >
> > > --
> > > Nabil Courdy
> > > mooab_at_emirates.net.ae (Sub moab for mooab)
> > > ======================
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > --
> > Owais Anjum
Received on Thu Mar 02 2000 - 00:00:00 CST

Original text of this message

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