[comp.sys.ibm.pc] Help! about Lattice_C.

joh@wright.EDU (Jae Chan Oh) (02/21/88)

Would someone please help me out?
I am trying to run a program code generated by Lattice-C compiler.
Actually I have a .EXE file, so far successfully.
----------------------
My problems is, 
When I run the .EXE file, it gives me the *err message*
 
"run time error  R6002, Floating Point not loaded".

What should I do? Do I have to load some files before I execute the
file? 
Please give me a detail answer about it.(e-mail would be preferable)
Thanks in advance.
-- 
Jae Chan Oh (Rm. 109, Computer Sci. Dept.)             | Disclaimer : 
Wright State University Research Building              | All mine ... 
3171 Research Blvd., Kettering, Ohio 45420             | As far as I
CSNET: joh@CS.wright.EDU   UUCP: ...!cbosgd!wright!joh | type..

swh@hpsmtc1.HP.COM (Steve Harrold) (02/23/88)

Re: Missing floating point

If you have the source to this program file, your problem might be that
you've used some floating point specification in a "printf" statement,
but you've made NO reference to floating point anywhere else in the code.
Since the COMPILER saw no need for the floating point library, it did not
generate external symbols to cause link-time resolution (remember, the 
"%" specification strings in a "printf" function are just treated as
literals, nothing special).

The error arises at LINK time because the "printf" function in the standard
C library HAS a need for the floating point library, due to the possibility
of having to service things like a "%g" specification.

The answer might be as simple as naming the floating point library on the
"link" command line.  Alternately, you could try inserting one dummy statement
in the source that explicitly uses floating point arithmetic.

Please note that this situation is NOT UNIQUE to Lattice.  All C compilers
share the "problem".

---------------------
Steve Harrold			...hplabs!hpsmtc1!swh
				HPG200/13
				(408) 447-5580
---------------------