Path: utzoo!attcan!uunet!husc6!uwvax!rutgers!ucsd!ucbvax!decwrl!pyramid!ctnews!starfish!cdold From: cdold@starfish.Convergent.COM (Clarence Dold) Newsgroups: comp.sys.ibm.pc Subject: Re: Help! Can't mix Microsoft Fortran and C! Message-ID: <689@starfish.Convergent.COM> Date: 5 Sep 88 17:48:19 GMT References: <13873@agate.BERKELEY.EDU> Organization: Convergent Technologies, San Jose, CA Lines: 35 From article <13873@agate.BERKELEY.EDU>, by pete@violet.berkeley.edu (Pete Goodeve): > We were all perfectly happy until someone tried to use it on a machine that > (unlike those in the lab) didn't have a math coprocessor installed. That > killed it. With a little thought the reason became obvious: a normal > Fortran main program calls a bunch of initialization routines, one of which > checks whether the 8087 is present and if not makes the necessary > adjustments. In our case the main program is in C, so no Fortran > initialization is ever done! Apparently for most things it doesn't matter > -- both languages use the same stack, for instance -- but it screwed us in > this case. [...] > said "use the /NOE option". Well, that isn't documented anywhere, but what > the hell... Yeah, all those error messages disappeared (guess that's what > "/NOE" means -- "NO Error messages"?), but any attempt to run the program > just gave the error "No Floating Point loaded". Dunh. (So what the hell > did it think it was loading from all those libraries? There were no > undefined symbols flagged.) I found that I had to use the /NOE in order to use wildcard expansion (pg 75 of the programmer's guide). It appears(?) to negate the /E option to 'prprocess to standard output' ( qcl /help ). The run-time error R6002 implies that you have FPU-only code from C. At the time QuickC is installed, you can elect an FPU environment, or it can be invoked with the /FPi87 to QCL. You will also need to change your default libraries. I find this switch to be most inconvenient. Although it runs contrary to pg 204 of the programmer's guide, my tests indicate that code compiled with the FP Emulator will take advantage of an existing FPU, as well as run without one. Code compiled for ..87 will only run on an ..87, causing the R6002 error on machines without. The only savings in ..87 code is some disk space, and perhaps load time. -- Clarence A Dold - cdold@starfish.Convergent.COM (408) 435-5274 ...pyramid!ctnews!mitisft!professo!dold P.O.Box 6685, San Jose, CA 95150-6685