Re: C++ & Pro*C v7

From: David S. Masterson <davidm_at_consilium.com>
Date: 13 Jul 93 16:51:48 GMT
Message-ID: <DAVIDM.93Jul13095148_at_malibu.consilium.com>


>>>>> On 12 Jul 93 03:51:50 GMT, pytlik_at_eris.cs.umb.edu (Marek Pytlik) said:
 

> In article <DAVIDM.93Jul10223034_at_malibu.consilium.com> davidm_at_consilium.com > (David S. Masterson) writes:  

>>>>>>> On 9 Jul 93 21:38:42 GMT, Jim_Holt_at_aprdlgtr.sps.mot.com (Jim Holt)
>>>>>>> said:
 

>>> Anyone have a script which can repair the sins committed by the Pro*C
>>> precompiler so that C++ will compile it's output ? (I have one that
>>> works for Oracle version 6.XXXX but not for Oracle version 7.XXX,
>>> which apparently commits many more sins than the previous version)
 

>>Do yourself a favor and isolate all your SQL into straight C functions that
>>the C++ code can call (extern "C"). Then compile the C functions with Pro*C
>>and link with the rest of your program.
 

> Why would anyone do it other than 'extern "C"' ?

The suggestion from Jim's question above is that he wanted to *compile* the results of the Pro*C precompile with a C++ compiler. My suggestion is don't do this. Instead, keep all the SQL in straight SQL/C functions, compile with a C compiler (after Pro*C), and reference the extern "C" functions within the C++ program.

--
====================================================================
David Masterson					Consilium, Inc.
(415) 691-6311					640 Clyde Ct.
davidm_at_consilium.com				Mtn. View, CA  94043
====================================================================
"Captain Picard trusts his bartender's instincts and saves the Federation."
-- Karl's synopsis of a recent Star Trek episode
Received on Tue Jul 13 1993 - 18:51:48 CEST

Original text of this message