I am not sure WHY you would want to do this: imbed assembler maybe? You would not be able to use malloc or most of the C functions. The Metal C functions resolve into different functions than normal C compiles. Also, unless you play games you cannot do I/O in Metal C (i.e. sprintf() works, but printf() does not). Many of the C functions have no Metal C equivalent, for example, the time and date ones, ICONV, etc.
It may be doable, but I would be very careful. Also, if you are going to ship this as part of the product, you need to use static linkage for the Metal C part particularly if you need to do __cinit. The underlying function changed between z/OS 1.11 and 1.12 and they are not necessarily compatible in execution. Been bitten there. Lloyd ----- Original Message ---- From: Charles Mills <[email protected]> To: [email protected] Sent: Fri, March 29, 2013 11:02:43 AM Subject: Re: Linking to MVS standard linkage function from Rexx What I said was "callable from C++." Surely you are not saying that a module written in Metal C cannot be declared with linkage extern "C" and called from C++. How would C++ "know" it was written in Metal C and not, for example, assembler? I read through the Metal C doc. Yes, it is C, not C++. For example, the STL does not exist. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Lloyd Fuller Sent: Friday, March 29, 2013 5:19 AM To: [email protected] Subject: Re: Linking to MVS standard linkage function from Rexx Charles, Before you get to far, unless things have changed, Metal C does not handle C++. C only. I have not looked specifically at z/OS 1.13, but I do know that in 1.12 and earlier, C only. Lloyd ----- Original Message ---- From: Charles Mills <[email protected]> To: [email protected] Sent: Thu, March 28, 2013 8:59:05 PM Subject: Linking to MVS standard linkage function from Rexx Level set: I know what I am doing in Rexx. I am real familiar with and have written function packages already. I want to write a function that will be callable both from Rexx and from C++. (This may be my first adventure with Metal C, but that's a ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
