Re: [Q] Compatibility of Oracle Pro*C and C++

From: Laura Roberts <infoman!laurar>
Date: Tue, 5 Oct 1993 16:09:54 GMT
Message-ID: <1993Oct5.160954.13722_at_infoman.com>


In article <1993Sep30.191612.6775_at_nynexst.com> dmj_at_seneca.nynexst.com (David Johnson) writes:
> [the fist half of this posting was missing, here is the full text]
>
> Hi Netters,
>
> Does anybody out there have any experience using Oracle's Pro*C
 compilers
> with C++, or more specifically with Microsoft Visual C++.
>
> The Oracle folks say that Pro*C will work with Microsoft C Version 7 and
> the Microsoft people say that therefore it should work with Microsoft C
> Version 8 (which is what they call the C/C++ compiler that comes with
> Visual C++).
>
> I figure that I would have to use the precompilers to help me build a
> C library of functions that to talk to the database. I'd then have
> to call these functions from my C++ program. Is it that difficult?
> Or, is it impossible!? I won't have the configuration to give it
> a try for a couple of weeks...
>
> If anybody has any experience with this kind of thing I'd love to
> hear about it.
>
> Thanks,
> Dave
>
> --
>


---

> David M. Johnson NYNEX Science & Technology
dmj_at_nynexst.com
> GIS Group, Wireless 500 Westchester Ave. Tel:
914-644-2864
> Communications Lab. White Plains, NY 10604 Fax:
914-644-2237 Hi, I have some experience using ORACLE OCI and C++. This may or may not help you, 'cause I'm doing this on the Macintosh in MacApp with C++. My version of C++ lets me include regular C files and call their functions (doesn't everybody's?). All I did was build a few custom objects which called the ORACLE libraries. The only compiling/linking problem I ran into was that C++ mangled the names of the functions. To take care of this, I included some link options to reference the mangled names to the real names. In case you didn't know, ORACLE does not support C++. I found it extremely difficult getting my questions answered from their C group. Basically as soon as they found out I was using C++, they tried to hang up on me. I encountered other difficulties when I tried to pass the login address to a method. Apparently (sp?), the ORACLE libraries only recognize the login address if it is in the exact place in memory it assumes it's in. I've tried everything to fix this - locking handles, locking objects, declaring a global login address. But nothing seems to work. So I'm stuck making a login everytime I make a call (it takes a couple of seconds to login, so everything is slower). I also could not seem to get any thing other than a character string from the ofetch command in the ORACLE libraries. I don't know what's going on here - I'm passing a dereferenced, locked handle to it that should work. Hope this helps (or at least forewarns you of what you're getting in to). Laura S. Roberts Information Management, Inc. One Decatur Towncenter 150 E. Ponce De Leon Avenue Suite 430 Decatur, Georgia 30030 (404) 377-4840 laurar_at_infoman.com
Received on Tue Oct 05 1993 - 17:09:54 CET

Original text of this message