Re: C++ and ProC compiler

From: Cheong Yu <kcy_at_meaddata.com>
Date: 11 May 1994 17:36:33 GMT
Message-ID: <2qr531$32c_at_meaddata.meaddata.com>


In article <CpLvr4.25Mu_at_empros.com>, rvonlehe_at_empros.com (Richard VonLehe) writes:
|> Forgive me if this has been covered before...
|>
|> I'm wondering somebody out there has precompiled C++ code with the ProC
|> precompiler and if they have made it work. I get new errors compiling the same
|> code when I use CC instead of cc. I thought it was curious that that I got
|> this error:
|>
|> "bload.c", line 301: error: unexpected 1 argument for sqlcex()
|>
|> and then found this in my "bload.c" file:
|>
|> extern sqlcex(/*_ unsigned long *, struct sqlexd *, struct sqlcxp * _*/);
|>
|> It would seem that the precompiler is creating the prototype as C++ would like
|> it to, but why does it comment out the parameters? Is there some flag that will
|> allow those parameters to go un-commented?
|>
|> Thanks,
|> Rich

I would also like to hear success or horror stories about using the Pro*C compilers with C++. Currently, I'm using wrappers in my C++ headers that declare the functions as "extern C" and they work fine, but I would be interested in a more "correct" C++ solution.

To answer the question above: I think you have to use the pre-compiler option CODE=ANSI_C to generate the proper function prototypes. It defaults to CODE=KR_C. I haven't tried this yet, so you might run into more problems later.

-- 
Cheong Yu             |                        |        (513) 865-7048
Mead Data Central     |                        |   Fax: (513) 865-1755
P.O. Box 933          |                        |      kcy_at_meaddata.com
Dayton, Ohio  45401   |                        |    uunet!meaddata!kcy
Received on Wed May 11 1994 - 19:36:33 CEST

Original text of this message