Re: WRB SDK problems

From: Michael Davis <mdavis_at_DELmultipath.com>
Date: 1997/05/07
Message-ID: <5kqu6u$1c5$1_at_mpsrv3.multipath.com>#1/1


In article <336F0BF7.7942_at_i-labs.co.il>, Yoav Ben-Yaar <yoav_at_i-labs.co.il> wrote:
>I am trying to develop a simple cartridge for Oracle Web
>Server 2.0 in C++.
>
>Setup:
>OWS 2.0
>Windows NT.
>Microsoft Visual C++ 4.0
>WRB API 1.0
>
>I'm able to compile and link to the web request broker API library
>(WRB.LIB) in C, but not in C++ (I get an undefined symbol error).
>
>Seems like I need an oracle API library suited to C++ ...
>
>Has anyone had experience with building C++ cartridges
>using the WRB API ?
>
>Thanks,
>
>-Yoav

Hi,

What you need to do is this:
When you include the WRB include files, surround the #includes with:

extern "C" {
...
}

Otherwise your C++ compiler will mangle the API names, and you won't be able to link with the Oracle library. Also, for the entry point which you tell Oracle, you need to go:

extern "C" testentry(...)

so that C++ won't mangle your function name.

Cheers,

-- 
// Michael Davis, Programmer/Analyst      I don't speak for Multipath.  //
// mdavis_at_DELmultipath.com                Nor do I speak against them.  //
// The 'DEL' in my address is an anti-spam device.                      //
// "Ego death is no party." - Andrew Cohen                              //
Received on Wed May 07 1997 - 00:00:00 CEST

Original text of this message