Great minds think alike! I am now thinking that perhaps I write the "SMF build" logic in the Metal C subset dialect, but then compile it two ways:
1. With Metal C for linking with Rexx. 2. With "standard" C (is there a name for non-metallic C? Plastic C?) for linking with the C++ code. Along with the advantage of avoiding the sorts of problems you allude to, another advantage would be that I could "sneak" some printf's for debugging purposes into the standard C compile, and then after debugging comment them back out of the source before doing the Metal C compile. (Or use #ifdefs.) Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Lloyd Fuller Sent: Monday, April 01, 2013 4:03 AM To: [email protected] Subject: Re: Linking to MVS standard linkage function from Rexx If he is careful, he can even compile C1 for normal C calls and compile it a second time with Metal C for calling from Rexx. I agree with Charles, calling from Rexx to Metal C is probably simpler than calling a standard C routine. We have several routines that we compile both ways: for some things we have a C or C++ main and use a set of functions compiled with c89. For other uses of those same functions, we have a little C routine DESIGNED to be called from assembler that initializes the Metal C library and builds the parameter lists for the same set of C functions. For a few of the "normal" C functions, we have some two-way #ifs in the code that says that if this is Metal C you use this set of #includes and it not Metal C you use a different set. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
