Path: utzoo!attcan!uunet!sco!md From: md (Michael Davidson) Newsgroups: comp.lang.fortran Subject: Re: Green Hills Fortran I/O init on Xenix Keywords: Calling Fortran from C Message-ID: <8402@scolex.sco.COM> Date: 25 Oct 90 16:13:51 GMT References: Sender: news@sco.COM Lines: 21 segall@caip.rutgers.edu (Ed Segall) writes: >I'm working on an Intel iPSC/2, running Green Hills FORTRAN under >Xenix. I've managed to successfully link C and Fortran routines (with >the main procedure being in C), except for one nasty little detail: >The fortran I/O doesn't work! >Here's the details: [ assorted woes about fortran i/o apparently not being initialised ... ] I'm not familiar with Green Hills Fortran, but I suspect that you may be able to kludge your way round this - sounds like you have a C program that is trying to call some Fortran routines - why not use a small Fortan MAIN program (so that Fortran gets initialised correctly) - call your real C main() (suitably renamed, and with suitable adjustments to the argc parameter which you will have to pass in by reference rather than by value) from Fortran, and then everything should work just fine. ...